@WebStormIDE Hi - Is there any option in webstorm for "check if not null" for a variable ? which basically adds `if (a!=null / undefined) {...}` , like in R# ?
-
Show this thread
-
If not , can we add something like this into the "alt+enter" menu ?
1 reply 0 retweets 0 likesShow this thread -
Replying to @Royi_Namir
There's no such intention right now, but you can use the postfix completion "notnull" for that: <var name>.notnull + Tab. You can also create a custom postfix completion template with a shorter abbreviation and different check.
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
That wouldn't be the same imho .... R# knew where to put the `if`. ( say I have many usages , nested usages , and I ctrl+enter in the inner usage, R# - knew to put the check at the first top usage)
1 reply 0 retweets 0 likes
We've created a feature request for that: https://youtrack.jetbrains.com/issue/WEB-34599 But right now we can't provide any ETA for it...
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.