Hacker News new | past | comments | ask | show | jobs | submit login

If you want it to work in Safari or Edge (or other ES6 compliant browsers), you can use

    Object.assign(foo, {'a': 'b', etc.})
Instead of

    {...foo, 'a': 'b', etc.}
For example, https://beta.observablehq.com/d/64da99d0a15ecb6a



Object spreads work in Safari (I'm using 11).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: