Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit e20b9b5

Browse files
committed
Refactor isResourceTableLoadingDeferred method to simplify exception handling
1 parent 6b310f6 commit e20b9b5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Concerns/Resources/InteractsWithTables.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace CodeWithDennis\FilamentTests\Concerns\Resources;
44

5-
use CodeWithDennis\FilamentTests\Exceptions\GlobalConfiguredUsingCouldNotBeDeterminedException;
65
use Filament\Actions\Action;
76
use Filament\Resources\Pages\ListRecords;
87
use Filament\Tables\Columns\Column;
@@ -127,11 +126,8 @@ public function getResourceTableVisibleActions(): array
127126

128127
public function isResourceTableLoadingDeferred(): bool
129128
{
130-
try {
131-
return $this->getGloballyConfiguredUsing(\Filament\Tables\Table::class)->isLoadingDeferred();
132-
} catch (GlobalConfiguredUsingCouldNotBeDeterminedException) {
133-
return $this->getResourceTable()->isLoadingDeferred();
134-
}
129+
return $this->getResourceTable()->isLoadingDeferred()
130+
?: $this->getGloballyConfiguredUsing(\Filament\Tables\Table::class)->isLoadingDeferred();
135131
}
136132

137133
public function isResourceTablePaginationEnabled(): bool

0 commit comments

Comments
 (0)