Skip to content

Commit

Permalink
chore: break on invalid handler
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJS committed May 13, 2024
1 parent 17e4d08 commit 5460556
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/qwik/src/qwikloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@ export const qwikLoader = (
emitEvent('qerror', { importError: true, error, symbol, uri });
}
}
if (!handler) return;
if (!handler) {
const error = new Error('Handler not found for ' + url.href);
emitEvent('qerror', { error, href: url.href });
// break out of the loop if handler is not found
break;
}
const previousCtx = doc[Q_CONTEXT];
if (element[isConnected]) {
const eventData = { symbol, element, reqTime };
Expand Down

0 comments on commit 5460556

Please sign in to comment.