mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-25 15:38:54 +00:00
Drop __super__
property from Class (#8800)
This commit is contained in:
@ -28,7 +28,7 @@ Class.extend = function (props) {
|
|||||||
this.callInitHooks();
|
this.callInitHooks();
|
||||||
};
|
};
|
||||||
|
|
||||||
const parentProto = NewClass.__super__ = this.prototype;
|
const parentProto = this.prototype;
|
||||||
|
|
||||||
const proto = Object.create(parentProto);
|
const proto = Object.create(parentProto);
|
||||||
proto.constructor = NewClass;
|
proto.constructor = NewClass;
|
||||||
@ -37,7 +37,7 @@ Class.extend = function (props) {
|
|||||||
|
|
||||||
// inherit parent's statics
|
// inherit parent's statics
|
||||||
for (const i in this) {
|
for (const i in this) {
|
||||||
if (Object.hasOwn(this, i) && i !== 'prototype' && i !== '__super__') {
|
if (Object.hasOwn(this, i) && i !== 'prototype') {
|
||||||
NewClass[i] = this[i];
|
NewClass[i] = this[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user