Skip to content

[FIX] Do not iterable on null error if adoptedStyleSheets is undefined#777

Closed
gaspar-chefdeville wants to merge 1 commit intomainfrom
gce/fix-iterable-on-null
Closed

[FIX] Do not iterable on null error if adoptedStyleSheets is undefined#777
gaspar-chefdeville wants to merge 1 commit intomainfrom
gce/fix-iterable-on-null

Conversation

@gaspar-chefdeville
Copy link
Contributor

No description provided.

}
mainWindow.document.adoptedStyleSheets = [
...mainWindow.document.adoptedStyleSheets,
...(mainWindow.document.adoptedStyleSheets ?? []),
Copy link
Contributor

Choose a reason for hiding this comment

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

When is adoptedStyleSheets undefined? because I agree it will prevent the error from being triggered, but it most probably means that adoptedStyleSheets is not supported at all, so all the styleSheets won't work anyway and the page will still be unusable 🤔

adoptedStyleSheets is supported in all major browsers since 2024 for the latest, so I'm wondering 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants