We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c840433 commit 59fab27Copy full SHA for 59fab27
support.js
@@ -66,6 +66,14 @@ const registerHooks = () => {
66
windowCoverageObjects = []
67
68
const saveCoverageObject = (win) => {
69
+ // accessing win.__coverage__ will error when testing cross-origin code
70
+ // because we don't control cross-origin code anyway, we can safely return
71
+ try {
72
+ win.__coverage__
73
+ } catch {
74
+ return
75
+ }
76
+
77
// if application code has been instrumented, the app iframe "window" has an object
78
const applicationSourceCoverage = win.__coverage__
79
if (!applicationSourceCoverage) {
0 commit comments