Object within a function breaks
bdc-stripe opened this issue · 1 comments
bdc-stripe commented
The following code throws an error:
let fn = () => {
let object = {
foo: 1,
bar: 2
}
}
Oddly enough, it works if the object has only one property, or if it's not in a function.
christophercurrie commented
Workaround: it looks like this equivalent succeeds:
let fn = () => {
let obj = ({
foo: 1,
bar: 2
});
}