Skip to content

Fix for browser support check#37

Merged
wesbos merged 2 commits intowesbos:masterfrom
jaceksupernak:master
Oct 2, 2020
Merged

Fix for browser support check#37
wesbos merged 2 commits intowesbos:masterfrom
jaceksupernak:master

Conversation

@jaceksupernak
Copy link
Copy Markdown
Contributor

Instead of checking if the variable exists in window, we should check the value of the variable instead. The variable will always exist in window because it has been defined beforehand.
Screen Shot 2020-05-27 at 18 26 13
Screen Shot 2020-05-27 at 18 38 38

Fixes the issue of returning true all the time regardless of window.SpeechRecognition value.
a = {}
'b' in a; //false
a.b = undefined;
'b' in a; //true
@wesbos wesbos merged commit 3abc413 into wesbos:master Oct 2, 2020
@wesbos
Copy link
Copy Markdown
Owner

wesbos commented Oct 2, 2020

thanks!

vasconsaurus pushed a commit to vasconsaurus/beginner-javascript that referenced this pull request Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants