Skip to content

Commit

Permalink
refactor: update worker mode condition
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Mar 26, 2024
1 parent bd8ffb7 commit 0592d0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export default function createRequestHandler(
otherwise(): Promise<void> | void;
};

if (args.length !== 3) {
if (typeof FetchEvent !== 'undefined' && args[0] instanceof FetchEvent) {
// worker mode
const [ev, opts] = args;
const { pathname, searchParams } = new URL(ev.request.url);
Expand Down

0 comments on commit 0592d0e

Please sign in to comment.