Skip to content

Commit

Permalink
fix: no throw when no query
Browse files Browse the repository at this point in the history
  • Loading branch information
sznowicki committed Dec 6, 2023
1 parent d00b621 commit 613223b
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 @@ -9,7 +9,7 @@ export const onRequestGet = async (context) => {
const { q, p = 0 } = Object.fromEntries(searchParams.entries());

const startTime = Date.now();
const [blogs, docs] = q ? await search(env, q, p) : [];
const [blogs, docs] = q ? await search(env, q, p) : [[], []];
const doneIn = Date.now() - startTime;
const hasResults = blogs.length > 0 || docs.length > 0;

Expand Down

0 comments on commit 613223b

Please sign in to comment.