Skip to content

Commit db3aa7d

Browse files
committed
Fix global filter find
1 parent 25dadba commit db3aa7d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Filters/GlobalFilters/GlobalFilters.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public function toArray(): array
5454

5555
public function findFilter(string $key): ?Filter
5656
{
57-
return $this->filterContainer()->findFilterHandler($key);
57+
return collect($this->getFilters())
58+
->firstWhere(fn (GlobalRequiredFilter $filter) => class_exists($key)
59+
? $filter instanceof $key
60+
: $filter->getKey() === $key
61+
);
5862
}
5963
}

0 commit comments

Comments
 (0)