What *does* and *should* this line of code do? const { } = undefined;
-
-
HERE LIES
RYAN CAVANAUGH
"why did you write that code in the first place"
1982 - 2019Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
w...was it me? I vaguely remember filing bugs on babel while I was implementing it in v8/jsc
-
Actually doesn't look like it! The issue was pretty tame. I had enough angry people that all the issues are a blur.https://github.com/babel/babel/issues/681 …
End of conversation
New conversation -
-
-
But the issue here is because you’re trying to destructure undefined, or because you didn’t specify keys to be destructured?
-
Both. When you do `const {foo} = undefined` that can just be `http://undefined.foo `, as that will always be an error. The problem becomes with `const {} = undefined;` where there's no property access so you have to do it yourself.
End of conversation
New conversation -
-
-
Github should have a label called "someone was angry" so you can tag these issues appropriately
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
But null is an object
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 