From e9f8555fe9fbbcdef6303741b5ef497fb4e369d5 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Thu, 13 Oct 2022 10:06:44 +0100 Subject: [PATCH] Update CanFormatState.php --- packages/tables/src/Columns/Concerns/CanFormatState.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/tables/src/Columns/Concerns/CanFormatState.php b/packages/tables/src/Columns/Concerns/CanFormatState.php index c98f6e7852..977c15f051 100644 --- a/packages/tables/src/Columns/Concerns/CanFormatState.php +++ b/packages/tables/src/Columns/Concerns/CanFormatState.php @@ -137,13 +137,7 @@ trait CanFormatState public function getFormattedState() { - $state = $this->getState(); - - if ($this->formatStateUsing) { - $state = $this->evaluate($this->formatStateUsing, [ - 'state' => $state, - ]); - } + $state = $this->evaluate($this->formatStateUsing ?? fn ($state) => $state); if ($this->prefix) { $state = $this->evaluate($this->prefix) . $state;