butternut
butternut copied to clipboard
Object within a function breaks
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.
Workaround: it looks like this equivalent succeeds:
let fn = () => {
let obj = ({
foo: 1,
bar: 2
});
}