Skip to content

Commit

Permalink
Update qwikloader.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJS committed May 13, 2024
1 parent 66be3ca commit 2ac2a2f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/qwik/src/qwikloader.ts
Expand Up @@ -96,8 +96,10 @@ export const qwikLoader = (
if (attrValue) {
const container = element.closest('[q\\:container]')! as QContainerElement;
const base = new URL(container[getAttribute]('q:base')!, doc.baseURI);
const manifest = container[getAttribute]('q:manifest-hash')
for (const qrl of attrValue.split('\n')) {
const url = new URL(qrl, base);
const href = url.href;
const symbol = url.hash[replace](/^#?([^?[|]*).*$/, '$1') || 'default';
const reqTime = performance.now();
let handler: any;
Expand Down Expand Up @@ -128,15 +130,16 @@ export const qwikLoader = (
importError,
error,
symbol,
href: url.href,
manifest,
href,
};
emitEvent('qerror', eventData);
// break out of the loop if handler is not found
break;
}
const previousCtx = doc[Q_CONTEXT];
if (element[isConnected]) {
const eventData = { symbol, element, reqTime };
const eventData = { manifest, href, symbol, element, reqTime };
try {
doc[Q_CONTEXT] = [element, ev, url];
isSync || emitEvent<QwikSymbolEvent>('qsymbol', eventData);
Expand Down

0 comments on commit 2ac2a2f

Please sign in to comment.