Skip to content

Commit

Permalink
fix: fix in opertor
Browse files Browse the repository at this point in the history
Signed-off-by: Zxilly <zhouxinyu1001@gmail.com>
  • Loading branch information
Zxilly committed Jul 29, 2021
1 parent 034ec91 commit 17f3588
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/coreEnforcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ export class CoreEnforcer {
const matcherKey = `${asyncCompile ? 'ASYNC[' : 'SYNC['}${exp}]`;

addBinaryOp('in', 1, (a, b) => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return (a in b) as number;
return (((b as unknown) as Array<any>).includes(a) as unknown) as number;
});

let expression = this.matcherMap.get(matcherKey);
Expand Down

0 comments on commit 17f3588

Please sign in to comment.