feat: allow using String.prototype.includes
in item effect filters
This commit is contained in:
parent
f4585f4254
commit
978301eab1
2 changed files with 11 additions and 4 deletions
|
@ -19,7 +19,7 @@ export class Evaluator<Context extends object> {
|
|||
get: (t, k) => (k === Symbol.unscopables ? undefined : t[k as keyof typeof t]),
|
||||
});
|
||||
actualPredicate = (identifier: string) =>
|
||||
predicate(identifier) || Object.getOwnPropertyNames(Math).includes(identifier);
|
||||
predicate(identifier) || Object.getOwnPropertyNames(context).includes(identifier);
|
||||
}
|
||||
this.validator = new Validator(actualPredicate);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue