You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This appears to be a bug in that specific version of CoffeeScript. To resolve this issue, you can either upgrade to a newer version of CoffeeScript or modify your code to work around the problem.
Here's your code with a slight modification to avoid the issue:
baz= ({ foo: _foo, bar: _bar } = {}) ->_foo?=false_bar?=false
In this modified code, we use the ?= operator to assign a default value to _foo and _bar if they are undefined or null. This should work as expected and avoid the error you encountered in CoffeeScript v1.12.7.
Bug report
Input Code
Expected Behavior
Current Behavior
Context
This often comes up with constructor params where you have several named params which all default to false
Environment
This occurs with v1.12.7 but not whatever v2.x.x version is on the main (non-v2) website
The text was updated successfully, but these errors were encountered: