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 cf6ee51 commit 7498d39Copy full SHA for 7498d39
src/control.ts
@@ -105,8 +105,12 @@ class EventedControl {
105
* @internal
106
*/
107
interface EventedControl extends L.Control, L.Evented {}
108
-Object.assign(EventedControl.prototype, L.Control.prototype);
109
-Object.assign(EventedControl.prototype, L.Evented.prototype);
+Object.getOwnPropertyNames(L.Control.prototype).forEach(
+ k => (EventedControl.prototype[k] = L.Control.prototype[k])
110
+);
111
+Object.getOwnPropertyNames(L.Evented.prototype).forEach(
112
+ k => (EventedControl.prototype[k] = L.Evented.prototype[k])
113
114
115
/**
116
* This is the geocoder control. It works like any other [Leaflet control](https://leafletjs.com/reference.html#control), and is added to the map.
0 commit comments