Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Jun 14, 2022
1 parent 0cc6cb9 commit 658bb72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/babel-traverse/src/path/evaluation.ts
Expand Up @@ -6,7 +6,7 @@ import type * as t from "@babel/types";
const VALID_CALLEES = ["String", "Number", "Math"] as const;
const INVALID_METHODS = ["random"] as const;

function isValidCalless(val: string): val is typeof VALID_CALLEES[number] {
function isValidCallees(val: string): val is typeof VALID_CALLEES[number] {
return VALID_CALLEES.includes(
// @ts-expect-error
val,
Expand Down Expand Up @@ -371,7 +371,7 @@ function _evaluate(path: NodePath, state: State): any {
if (
callee.isIdentifier() &&
!path.scope.getBinding(callee.node.name) &&
isValidCalless(callee.node.name)
isValidCallees(callee.node.name)
) {
func = global[callee.node.name];
}
Expand All @@ -384,7 +384,7 @@ function _evaluate(path: NodePath, state: State): any {
if (
object.isIdentifier() &&
property.isIdentifier() &&
isValidCalless(object.node.name) &&
isValidCallees(object.node.name) &&
!isInvalidMethods(property.node.name)
) {
context = global[object.node.name];
Expand Down

0 comments on commit 658bb72

Please sign in to comment.