Skip to content

Commit

Permalink
fix: exit early when both atomics and ServiceWorker are not supported (
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekkolodziej authored Sep 6, 2023
1 parent 9a5d1ad commit 3e8b049
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/integration/snippet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const createSnippet = (config: PartytownConfig | undefined | null, snippe

return [
`!(function(w,p,f,c){`,
`if(!window.crossOriginIsolated && !navigator.serviceWorker) return;`,
Object.keys(filteredConfig).length > 0
? `c=w[p]=Object.assign(w[p]||{},${configStr});`
: `c=w[p]=w[p]||{};`,
Expand Down

1 comment on commit 3e8b049

@vercel
Copy link

@vercel vercel bot commented on 3e8b049 Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.