Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: win is indefined #822

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Conversation

bertrand-sifre
Copy link
Contributor

In some cases, 'win' can be undefined. I fixed this by using optional chaining.

@CLAassistant
Copy link

CLAassistant commented Apr 26, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link

@jennifer-shehane jennifer-shehane changed the title fix win is indefined fix: win is indefined Apr 26, 2024
@jennifer-shehane jennifer-shehane merged commit 1cf7df2 into cypress-io:master Apr 26, 2024
23 of 24 checks passed
@cypress-app-bot
Copy link

🎉 This PR is included in version 3.12.37 🎉

The release is available on:

Your semantic-release bot 📦🚀

@GarholAviva
Copy link

GarholAviva commented May 3, 2024

This might have introduced a bug although it may be my configuration.
Since upgrading I now see:

Error: Webpack Compilation Error
./node_modules/@cypress/code-coverage/support.js 70:44
Module parse failed: Unexpected token (70:44)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     const saveCoverageObject = (win) => {
|       // if application code has been instrumented, the app iframe "window" has an object
>       const applicationSourceCoverage = win?.__coverage__
|       if (!applicationSourceCoverage) {
|         return

@KyDenZ
Copy link

KyDenZ commented May 31, 2024

I encountered the same error.
I had to update Cypress to a version higher than 12.17.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants