File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ public function provide(): LazyCollection
2626
2727 $ this ->applyQueryScope ($ query );
2828
29- if (! $ this ->hasFilter ()) {
29+ if ($ this ->filter ()) {
3030 $ query ->whereStatus ('published ' );
3131 }
3232
3333 return $ query ->lazy (config ('statamic.search.chunk_size ' ));
3434 });
3535
36- if ($ this ->hasFilter ()) {
37- return $ models ->filter ($ this -> filter () )->values ()->map ->reference ();
36+ if ($ filter = $ this ->filter ()) {
37+ return $ models ->filter ($ filter )->values ()->map ->reference ();
3838 }
3939
4040 return $ models ->map ->reference ();
@@ -52,9 +52,9 @@ public function contains($searchable): bool
5252 return false ;
5353 }
5454
55- if ($ this ->hasFilter ()) {
55+ if ($ filter = $ this ->filter ()) {
5656 return (! $ resource ->hasPublishStates () || $ searchable ->published ())
57- && $ this -> filter () ($ searchable );
57+ && $ filter ($ searchable );
5858 }
5959
6060 $ query = $ resource ->newEloquentQuery ()
You can’t perform that action at this time.
0 commit comments