-
Notifications
You must be signed in to change notification settings - Fork 153
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 bug with cypress testIsolation
option
#257
Fix bug with cypress testIsolation
option
#257
Conversation
3842ba2
to
a34406f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I've faced the same issue when upgrading to version v9.0.0 and still occurs on version v10.0.0
@kentcdodds Could we include this PR in the next release?
@@ -37,7 +37,7 @@ function createQuery(queryName, implementationName) { | |||
Cypress.log({ | |||
name: queryName, | |||
type: | |||
this.get('prev').get('chainerId') === this.get('chainerId') | |||
this.get('prev')?.get('chainerId') === this.get('chainerId') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this does the same thing and is more terse :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
🎉 This PR is included in version 10.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you so much! |
What:
This fixes a bug where
this.get('prev')
returns undefined in some scenarios and the commandthis.get('prev').get('chainerId')
throws an error since it's attempting to readget
ofundefined
.Why:
There is more information about this issue here: #248, but several people have commented that they are experiencing this. @matt-vendia responded with a solution on that issue, which solves the problem for me too (along with others who thumbs-upped the comment).
How:
Make sure
this.get('prev')
exists before assuming it's an object.Checklist:
This change is safe and small enough that it is ready to be merged imo.