1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #15486 from nmtigor/fix_orders_of_prop

Fix property chain orders of Operators in isDotExpression
This commit is contained in:
calixteman 2022-09-25 04:13:25 -10:00 committed by GitHub
commit da1780f826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -661,14 +661,14 @@ class AstBinaryOperator extends Leaf {
}
isDotExpression() {
return Operators.id.dot <= this.id && this.id <= Operators.id.dotHash;
return Operators.dot.id <= this.id && this.id <= Operators.dotHash.id;
}
isSomPredicate() {
return (
this.isDotExpression() ||
(Operators.id.lt <= this.id &&
this.id <= Operators.id.or &&
(Operators.lt.id <= this.id &&
this.id <= Operators.or.id &&
((this.left.isDotExpression() && this.right.isConstant()) ||
(this.left.isConstant() && this.right.isDotExpression()) ||
(this.left.isDotExpression() && this.right.isDotExpression())))