You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given these types, Flow does not understand that subsequent lines are still protected by an if statement. It only understands that the first line is protected. Example:
if(person.prefs){// This does not cause an error.console.log(person.prefs.favorite_color);// This causes an error (but should not).console.log(person.prefs.favorite_number);}
Flow reports this error which is incorrect since the code is protected by an if statement:
17: console.log(person.prefs.favorite_number);
^ property `favorite_number`. Property cannot be accessed on possibly null value
17: console.log(person.prefs.favorite_number);
^ null
lensbart, mufasa71, smmorneau, cloudlena, talha131 and 1 more