Destructuring with default object won't work on `n

Run Settings
LanguageJavaScript
Language Version
Run Command
function doAsync(result) { return Promise.resolve(result) .then(({ value = 'default' } = {}) => { return value }) } Promise.resolve() .then(() => { return doAsync({ value: 'foo' }) .then((value) => { console.log(value) }) }) .then(() => { return doAsync(undefined) .then((value) => { console.log(value) }) }) .then(() => { return doAsync(null) .then((value) => { console.log(value) }) })
Editor Settings
Theme
Key bindings
Full width
Lines