We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 207b027 commit a4ac9deCopy full SHA for a4ac9de
support.js
@@ -71,8 +71,15 @@ const registerHooks = () => {
71
// because we don't control the cross-origin code, we can safely return
72
let applicationSourceCoverage
73
try {
74
- applicationSourceCoverage = win?.__coverage__
+ // Note that we are purposefully not supporting the optional chaining syntax here to
75
+ // support a wide range of projects (some of which are not set up to support the optional
76
+ // chaining syntax due to current Cypress limitations). See:
77
+ // https://github.com/cypress-io/cypress/issues/20753
78
+ if (win) {
79
+ applicationSourceCoverage = win.__coverage__
80
+ }
81
} catch {}
82
+
83
if (!applicationSourceCoverage) {
84
return
85
}
0 commit comments