diff --git a/packages/spatie-laravel-tags-plugin/src/Tables/Columns/SpatieTagsColumn.php b/packages/spatie-laravel-tags-plugin/src/Tables/Columns/SpatieTagsColumn.php index c9c9ae33ef..1168a7867b 100644 --- a/packages/spatie-laravel-tags-plugin/src/Tables/Columns/SpatieTagsColumn.php +++ b/packages/spatie-laravel-tags-plugin/src/Tables/Columns/SpatieTagsColumn.php @@ -28,13 +28,13 @@ class SpatieTagsColumn extends TextColumn */ public function getState(): array { - $state = parent::getState(); - - if ($state && (! $state instanceof Collection)) { - return $state; - } - return $this->cacheState(function (): array { + $state = parent::getState(); + + if ($state && (! $state instanceof Collection)) { + return $state; + } + $record = $this->getRecord(); if ($this->hasRelationship($record)) { diff --git a/packages/support/src/Concerns/HasCellState.php b/packages/support/src/Concerns/HasCellState.php index 1a95507baf..6902ad0f4c 100644 --- a/packages/support/src/Concerns/HasCellState.php +++ b/packages/support/src/Concerns/HasCellState.php @@ -305,7 +305,7 @@ trait HasCellState $record = $this->getRecord(); if (! $record) { - return $state(); + return null; } $recordKey = (string) $record->getKey();