Skip to content

Commit

Permalink
fix(linter): global variables should always check the builtin variabl…
Browse files Browse the repository at this point in the history
…es (#4209)

This fixes commit dbbb6fc.

Closes #3374
  • Loading branch information
jelly authored Jul 11, 2024
1 parent 91dc0f7 commit dd07a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl<'a> LintContext<'a> {
}

pub fn env_contains_var(&self, var: &str) -> bool {
if GLOBALS["builtin"].contains_key("var") {
if GLOBALS["builtin"].contains_key(var) {
return true;
}
for env in self.env().iter() {
Expand Down

0 comments on commit dd07a54

Please sign in to comment.