diff --git a/functions/index.js b/functions/index.js index 67a5846..4b4a37b 100644 --- a/functions/index.js +++ b/functions/index.js @@ -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, {