12-14-2021 11:43
12-14-2021 11:43
12-14-2021 11:51
12-14-2021 11:51
Not = but == or ideally ===
I think that permissions return boolean, so I wouldn't use strings for "false", etc.
Your post was hard to read; it would be great if you could format text snippets as code. 🙂
12-14-2021 13:06
12-14-2021 13:06
oh, cool. Thanks!
12-15-2021 07:30
12-15-2021 07:30
One of the most common mistakes and hard to find. Never use = in an if-statement. I even avoid it because of this mistake.
And when an expression is boolean then use if ( !expression) or if (expression).