Skip to content

Commit

Permalink
fix: restore the initial state after resetting the search term
Browse files Browse the repository at this point in the history
Closes #4
  • Loading branch information
Steffen Giers committed Jan 22, 2020
1 parent aaa819a commit 5d7980e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
$page = get('page');
$query = get('search', '*');

if (empty($query)) {
$query = '*';
}

return site()->search($query, 'title')->paginate([
'page' => $page,
'limit' => 10,
Expand Down

0 comments on commit 5d7980e

Please sign in to comment.