Skip to content

Commit

Permalink
fix(client): test for presence of replace method of CSSStyleSheet (#2773
Browse files Browse the repository at this point in the history
)

Test for presence of replace-Method of CSSStyleSheet as we rely on this method. Not every browser that implements CSSStyleSheet does also implement CSSStyleSheet.replace()
  • Loading branch information
MBlanquett authored Dec 22, 2020
1 parent 4852224 commit 67e0ea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/client-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const supportsConstructibleStylesheets = BUILD.constructableCSS
? /*@__PURE__*/ (() => {
try {
new CSSStyleSheet();
return true;
return typeof (new CSSStyleSheet()).replace === 'function';
} catch (e) {}
return false;
})()
Expand Down

0 comments on commit 67e0ea8

Please sign in to comment.