diff --git a/js/src/common/utils/Evented.ts b/js/src/common/utils/Evented.ts index 7170d1216..5bb5328c6 100644 --- a/js/src/common/utils/Evented.ts +++ b/js/src/common/utils/Evented.ts @@ -51,8 +51,8 @@ export default class Evented { * @param handler The function to handle the event. */ one(event: string, handler: EventHandler): this { - const wrapper = function() { - handler.apply(this, arguments); + const wrapper = function(this: Evented) { + handler.apply(this, Array.from(arguments)); this.off(event, wrapper); };