Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation with comment /*?*/ isn't working for optional chaining in Webstorm #547

Closed
aelyseev opened this issue Oct 2, 2020 · 1 comment

Comments

@aelyseev
Copy link

aelyseev commented Oct 2, 2020

Issue description or question

Live output comment /* ? */ isn't working for expressions, which contains optional chaining. But in the console, the expression evaluates correctly. Expressions without optional chaining work as expected.

Sample code

scratch file

const { URLSearchParams } = require('url');

const searchParams = new URLSearchParams;
searchParams.get('type')?.split(',') /*?*/

.quaokka

{
  "babel": {
    "plugins": ["@babel/plugin-proposal-optional-chaining", "@babel/plugin-proposal-nullish-coalescing-operator"]
  },
  "plugins": ["jsdom-quokka-plugin"]
}

Quokka.js Console Output

Quokka #1 (node: v10.18.0, babel: v7.6.4, plugins: jsdom-quokka-plugin)

URLSearchParams {} at new URLSearchParams() quokka.jsx:3:0

[ 'A', 'B' ] at (_searchParams$get = searchParams.get('m... quokka.jsx:5:0

Code editor version

Webstorm v 2020.2.2

OS name and version

OSX 10.15.6

Preview

preview

@ArtemGovorov
Copy link
Member

Thanks for the report. The issue is fixed in the latest plugin v1.0.257.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants