fix undefined if searchstring is empty

This commit is contained in:
Flummi 2022-05-06 14:48:47 +02:00
parent 68ce51b892
commit 7b2ad52fe0
2 changed files with 1 additions and 2 deletions

View File

@ -36,7 +36,6 @@ export default (router, tpl) => {
result: ret,
totals: await lib.countf0cks(),
searchstring: tag,
session: req.session,
tmp: null
}, req)
});

View File

@ -1,7 +1,7 @@
@include(snippets/header)
<h1 style="text-align: center">f0ckgle</h1>
<form action="/search" class="admin-search">
<input type="text" name="tag" value="{!! searchstring !!}" /><button type="submit"><b>f0ck</b></button>
<input type="text" name="tag" value="{!! searchstring || '' !!}" /><button type="submit"><b>f0ck</b></button>
</form>
<div class="results">
@if(result)