fix: quicksearch searching by null throws error

The middleware automatically converts empty strings to null. We want to accept empty strings here for the search to work. Currently, the regex throws an error when a null is passed to it.
This commit is contained in:
Roardom
2025-07-22 09:26:21 +00:00
parent d06c82b31a
commit 26e27f7300
@@ -27,7 +27,7 @@ class QuickSearchController extends Controller
{
public function index(Request $request): \Illuminate\Http\JsonResponse
{
$query = $request->input('query');
$query = $request->input('query', '');
$filters = [
'deleted_at IS NULL',