Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why inside If statement is exempt #545

Open
JiaYifan opened this issue Feb 17, 2023 · 1 comment
Open

why inside If statement is exempt #545

JiaYifan opened this issue Feb 17, 2023 · 1 comment

Comments

@JiaYifan
Copy link

image
The question is, the code in If statement is exempt from browser compatibility check. It seems unreasonable.

@bschlenk
Copy link

bschlenk commented Sep 22, 2023

I think it's meant to allow checking for the existence of a thing before using it, like

if (window.fetch) {
  fetch()
}

But it's too broad because it also means it doesn't catch

if (true) {
  fetch()
}

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

No branches or pull requests

2 participants