The wrong processing of destructuring
See original GitHub issueIf location
declared inside function or passed as function parameter we should not process it.
It needs for fix https://github.com/DevExpress/testcafe-hammerhead/issues/640#issuecomment-228679853
Update! The origin issue was transfered to https://github.com/DevExpress/testcafe-hammerhead/issues/2283
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Destructuring assignment - JavaScript - MDN Web Docs
The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from ...
Read more >Incorrect processing of destructuring arrays in rest elements
type evaluation issue - destructuring arrays inside rest-parameters were incorrectly evaluated, leading to such false errors as in the second example.
Read more >Object destructuring best practice in Javascript | by Crunch Tech
This blog post is a short summary of where we started from with our object property access patterns, how we initially started to...
Read more >Destructuring and parameter handling in ECMAScript 6 - 2ality
ECMAScript 6 (ES6) supports destructuring, a convenient way to extract values from data stored in (possibly nested) objects and arrays.
Read more >10. Destructuring - Exploring JS
Destructuring is a convenient way of extracting multiple values from data stored in (possibly nested) objects and Arrays. It can be used in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay i just found out myself. Renaming the location param to anything else fixes the problem. I guess hammerhead always assumes
location
iswindow.location
, which it is not for us.Another example occurs with Angular 9 + ngx-pipes within the ShufflePipe class
This:
[shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
Becomes this:
[ __get$(shuffled,i), __get$(shuffled,j)] = [ __get$(shuffled,j), __get$(shuffled,i)];