JS Optional Chaining

Can anyone tell me, why the inspection of Reshaper is reporting following JavaScript code as a JScriptError? 

const person = { firstName: "John", lastName: "Doe" };

console.log(person?.firstName);

These are the error messages (on the line with the console.log):

-> ) expected

-> ; is expected

The file opened in Rider has no issues. Which configuration in the inspections will resolve this issue? 

Thanks a lot for any tips

 

 

1
3 comments

Hello,

Could you please try installing ReSharper 2022.1 EAP version and check if the problem is still reproduced.

Thank you.

0

Hi,

Thanks, with this version, the problem is solved.

Is there a already a release date for this version?

Thank you

0

Hello,

2022.1 version is going to be released at the end of March - beginning of April.

Thank you.

0

Please sign in to leave a comment.