Spread operators in object literals cause crashes in Edge/EdgeHTML
See original GitHub issueBug Report
naja built source contains spread operator (...) in object literals, which is ES2018 feature. But Edge 12-18 (with EdgeHTML core) throws syntax error, because they implement only ES2015.
In the migration guide from v1 to v2, there is only mentioned that IE is no more supported, no mention about Edge. But .browserslistrc list last 2 versions which mean that old Edges with EdgeHTML core do not match anymore.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Spread syntax (...) - JavaScript - MDN Web Docs - Mozilla
In an object literal, the spread syntax enumerates the properties of an object and adds the key-value pairs to the object being created....
Read more >Why is this spread operator causing a SyntaxError
It's a parsing error that's detected before your program even starts running. Crashes are when your program compiles/parses OK, but does an ...
Read more >What's the Spread Operator Used For in JavaScript?
The spread operator spreads these values within a new object of the same type; in this case, an array literal. Try running the...
Read more >Spreads: Common Errors & Fixes - Flow - Medium
In v0.111 the Flow team is rolling out a ton of fixes to object spreads (spreading an object in an expression, see “Spread...
Read more >JavaScript operator: Spread syntax (...): Spread in object literals
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
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 Free
Top 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

I mean, you can always tweak your build configuration to further transpile
najaif you need to support any ancient browser (Edge 16 is almost 3 years old). It just doesn’t make sense to me for Naja itself to support anything else than the latest version.I’ve created this patch for myself quickly and found no further problem in Edge 18.