Skip to content

Commit 004784e

Browse files
Webbist-devmarcj
authored andcommitted
Adding error check for InvalidAccessError (marcj#197)
This only happens with Firefox due to their security policy. Fix found in previous issue thread. marcj#117 Can confirm this was due to typekit being included in the project. It was quite annoying to debug in a build environment via es6 module loader (systemJS) so hopefully, this PR solves the issue for people. All credit to @jyrkij
1 parent 100d74f commit 004784e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ElementQueries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
try {
390390
readRules(document.styleSheets[i].cssRules || document.styleSheets[i].rules || document.styleSheets[i].cssText);
391391
} catch(e) {
392-
if (e.name !== 'SecurityError') {
392+
if (e.name !== 'SecurityError' && e.name !== 'InvalidAccessError') {
393393
throw e;
394394
}
395395
}

0 commit comments

Comments
 (0)