Skip to content

Commit

Permalink
Core: Remove unused Object.getPrototypeOf() fallback in equiv.js
Browse files Browse the repository at this point in the history
No longer needed as of QUnit 2.0, which removed support for IE6-8.

<https://caniuse.com/mdn-javascript_builtins_object_getprototypeof>
<https://qunitjs.com/intro/#browser-support>
  • Loading branch information
Krinkle committed Apr 18, 2022
1 parent 7824eb4 commit 01bdab0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/equiv.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ export default (function () {
// Elements are { a: val, b: val }.
let pairs = [];

const getProto = Object.getPrototypeOf || function (obj) {
// eslint-disable-next-line no-proto
return obj.__proto__;
};

function useStrictEquality (a, b) {
// This only gets called if a and b are not strict equal, and is used to compare on
// the primitive values inside object wrappers. For example:
Expand All @@ -30,8 +25,8 @@ export default (function () {
}

function compareConstructors (a, b) {
let protoA = getProto(a);
let protoB = getProto(b);
let protoA = Object.getPrototypeOf(a);
let protoB = Object.getPrototypeOf(b);

// Comparing constructors is more strict than using `instanceof`
if (a.constructor === b.constructor) {
Expand Down

0 comments on commit 01bdab0

Please sign in to comment.