parent.location gets compiled to self.location causing a runtime error. see screenhsts:
Original code
Code running on Cypress
Desired behavior
I suppose cypress is renaming this to fix some internal behavior, but it should be smarter on when to do this to not affect user code. In this case, e is an internal parameter that is not related to window or anything like that, so it should stay as is.
Test code to reproduce
var e = { parent: { location: 'hi' } };
console.log(e.parent.location);
Uncaught TypeError: Cannot read properties of undefined (reading 'location')
Current behavior
parent.location gets compiled to self.location causing a runtime error. see screenhsts:
Desired behavior
I suppose cypress is renaming this to fix some internal behavior, but it should be smarter on when to do this to not affect user code. In this case,
e
is an internal parameter that is not related towindow
or anything like that, so it should stay as is.Test code to reproduce
Uncaught TypeError: Cannot read properties of undefined (reading 'location')
Cypress Version
13.8.1
Node version
v20.13.0
Operating System
macOS 14.5
Debug Logs
No response
Other
No response