FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

util: use more primordials in `comparisons.js` · nodejs/node@f373dab · GitHub

/ node Public

Commit f373dab

Browse files
authored andcommitted
util: use more primordials in comparisons.js
PR-URL: #61198 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Jordan Harband <ljharb@gmail.com>
1 parent a5e5c7f commit f373dab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/internal/util/comparisons.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ function setEquiv(a, b, mode, memo) {
761761
// If the specified value doesn't exist in the second set it's a object
762762
// (or in loose mode: a non-matching primitive). Find the
763763
// deep-(mode-)equal element in a set copy to reduce duplicate checks.
764-
array.push(val);
764+
ArrayPrototypePush(array, val);
765765
}
766766
}
767767

@@ -891,7 +891,7 @@ function mapEquiv(a, b, mode, memo) {
891891
}
892892
array = [];
893893
}
894-
array.push(key2);
894+
ArrayPrototypePush(array, key2);
895895
} else {
896896
// By directly retrieving the value we prevent another b.has(key2) check in
897897
// almost all possible cases.
@@ -907,7 +907,7 @@ function mapEquiv(a, b, mode, memo) {
907907
if (array === undefined) {
908908
array = [];
909909
}
910-
array.push(key2);
910+
ArrayPrototypePush(array, key2);
911911
}
912912
}
913913
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL