Skip to content

Commit 01bdab0

Browse files
committed
Core: Remove unused Object.getPrototypeOf() fallback in equiv.js
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>
1 parent 7824eb4 commit 01bdab0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/equiv.js

+2-7
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ export default (function () {
88
// Elements are { a: val, b: val }.
99
let pairs = [];
1010

11-
const getProto = Object.getPrototypeOf || function (obj) {
12-
// eslint-disable-next-line no-proto
13-
return obj.__proto__;
14-
};
15-
1611
function useStrictEquality (a, b) {
1712
// This only gets called if a and b are not strict equal, and is used to compare on
1813
// the primitive values inside object wrappers. For example:
@@ -30,8 +25,8 @@ export default (function () {
3025
}
3126

3227
function compareConstructors (a, b) {
33-
let protoA = getProto(a);
34-
let protoB = getProto(b);
28+
let protoA = Object.getPrototypeOf(a);
29+
let protoB = Object.getPrototypeOf(b);
3530

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

0 commit comments

Comments
 (0)