Skip to content

Commit

Permalink
fix: don't send hasResults when there is no query
Browse files Browse the repository at this point in the history
  • Loading branch information
sznowicki committed Dec 21, 2023
1 parent de9df18 commit 9aaf336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const onRequestGet = async (context) => {
'--has-query': hasQuery,
});

const hasResults = results.length > 0;
const hasResults = hasQuery ? results.length > 0 : undefined;

// without await it might get killed before sending by cloudflare
await emitPageView(context, {
Expand Down

0 comments on commit 9aaf336

Please sign in to comment.