question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The wrong processing of destructuring

See original GitHub issue

If 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:closed
  • Created 7 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
silberjancommented, Jan 3, 2020

Okay i just found out myself. Renaming the location param to anything else fixes the problem. I guess hammerhead always assumes location is window.location, which it is not for us.

0reactions
ajspottcommented, Apr 13, 2020

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)];

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found