diff options
| author | unwox <me@unwox.com> | 2024-11-14 23:54:30 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-11-15 00:04:28 +0600 |
| commit | d1187c13a378a026645d6361f893bcc25d5d2ed2 (patch) | |
| tree | 699226f3eb67c94e11d23e24b48e480cb4d8d49f /bin | |
| parent | 43e4bcb301ca469427e5022e510fb06e94225117 (diff) | |
fix search on categories pages
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/serve.fnl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/serve.fnl b/bin/serve.fnl index 4c2253e..ad53afc 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -480,7 +480,8 @@ (fn render-listing [form category] (local headers {:content-type "text/html"}) - (when category (table.insert form.tags category)) + (when (and category (= 0 (# form.tags))) + (tset form.tags 1 category)) (local {: results : total} (query-products form form.page)) (local spellfix-suggestion |
