Skip to content

Commit

Permalink
Fix isReservedIdentifier (#361)
Browse files Browse the repository at this point in the history
Switches `isReservedIdentifier` to use `hasOwnProperty` to avoid
matching the Object prototype.
  • Loading branch information
Fireboltofdeath authored Sep 26, 2023
1 parent 895ea3f commit 225183e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LuauAST/util/isReservedIdentifier.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { globals } from "LuauAST/impl/globals";

export function isReservedIdentifier(id: string) {
return id in globals;
return Object.prototype.hasOwnProperty.call(globals, id);
}

0 comments on commit 225183e

Please sign in to comment.