mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-31 16:06:29 +08:00
Fixed empty search scenario
This commit is contained in:
parent
715dee2d0e
commit
7a2e39212e
|
@ -45,6 +45,10 @@ class SearchOptions
|
|||
*/
|
||||
public static function fromRequest(Request $request): SearchOptions
|
||||
{
|
||||
if (!$request->has('search') && !$request->has('term')) {
|
||||
return static::fromString('');
|
||||
}
|
||||
|
||||
if ($request->has('term')) {
|
||||
return static::fromString($request->get('term'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user