Webstorm is occasionally slow to propagate the changes.
What I would recommend is to check and ensure that you the webstorm TypeSript service is using the right TypeScript version, and that it is using the right tsconfig.json
file on your project.
On the Webstorm menu, go to Preferences -> Languages & Frameworks -> TypeScript.
Ensure that is is loading TypeScript from your project's node_modules
, and not anywhere else. In addition, the compile scope should be set to Project Files
It may also help if you restart TypeScript service.
In addition, if you are using TypeScript 3.7.5 and above, you can simplify your conditional rendering by using optional chaining:
selectedLocalOwner?.id && .....