Skip to content

Commit

Permalink
fix: remove script length check when initializing service worker (Qwi…
Browse files Browse the repository at this point in the history
  • Loading branch information
shyam-builder authored and adamdbradley committed Mar 7, 2022
1 parent 53502c9 commit d466d57
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/lib/main/snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function snippet(
if (top != win) {
// this is an iframe
top!.dispatchEvent(new CustomEvent('pt1', { detail: win }));
} else if (scripts!.length) {
} else {
// set a timeout to fire if PT hasn't initialized in Xms
timeout = setTimeout(fallback, 10000);
doc.addEventListener('pt0', clearFallback);
Expand Down Expand Up @@ -65,8 +65,6 @@ export function snippet(
// no support for atomics or service worker
fallback();
}
} else if (debug && scripts!.length === 0) {
console.debug('No Partytown scripts found');
}
} else if (debug) {
console.warn('Partytown config.lib url must start with "/"');
Expand Down

0 comments on commit d466d57

Please sign in to comment.