Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove script length check when initializing service worker #100

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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