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
The exponentiation operator is just one case. It also throws with template literals for example
a?.b(`foo`)
Looks like it might be a caching thing. While debugging with the node debugger, the path that transform-template-literals was trying to replace had indeed container set to null but it fixed itself after I ran something like parentPath.get('arguments') or similar in the debug console just to see what was going on.
The text was updated successfully, but these errors were encountered:
Hey @microbouji! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
Bug Report
Current Behavior
The following input code throws "Container is falsy"
Input Code
Expected behavior/code
Babel Configuration (.babelrc, package.json, cli command)
Order doesn't matter.
Environment
cli
,register
,loader
]Possible Solution
Additional context/Screenshots
a?.(2 ** 3)
works fine. So I think it only happens when the result offindReplacementPath
is not the same aspath
itself in https://github.com/babel/babel/blob/master/packages/babel-plugin-proposal-optional-chaining/src/index.js#L138The exponentiation operator is just one case. It also throws with template literals for example
Looks like it might be a caching thing. While debugging with the node debugger, the path that
transform-template-literals
was trying to replace had indeed container set tonull
but it fixed itself after I ran something like parentPath.get('arguments') or similar in the debug console just to see what was going on.The text was updated successfully, but these errors were encountered: