We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6180e9a commit 5c5df3dCopy full SHA for 5c5df3d
src/lib/super.js
@@ -56,16 +56,17 @@
56
return fn.apply(this, arrayOfArgs || []);
57
}
58
};
59
-
60
function nextSuper(proto, name, caller) {
61
// look for an inherited prototype that implements name
62
- while (proto &&
63
- (!proto.hasOwnProperty(name) || proto[name] === caller)) {
+ while (proto) {
+ if ((proto[name] !== caller) && proto[name]) {
+ return proto;
64
+ }
65
proto = getPrototypeOf(proto);
66
- return proto;
67
68
69
+
70
function memoizeSuper(method, name, proto) {
71
// find and cache next prototype containing `name`
72
// we need the prototype so we can do another lookup
0 commit comments