From 4f52beb32a125c65780a043e3c3b2ff1e647d9ca Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 1 Sep 2016 16:30:01 +0200 Subject: [PATCH] Avoid local variable name `self' in module.js refs #10703 --- public/js/icinga/module.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/js/icinga/module.js b/public/js/icinga/module.js index 83700eb39..2c2368e5b 100644 --- a/public/js/icinga/module.js +++ b/public/js/icinga/module.js @@ -80,16 +80,16 @@ }, applyHandlers: function () { - var self = this; + var _this = this; $.each(this.registeredHandlers, function (key, on) { - self.bindEventHandler( + _this.bindEventHandler( on.event, on.filter, on.handler ); }); - self = null; + _this = null; return this; }, @@ -98,10 +98,10 @@ * Effectively bind the given event handler */ bindEventHandler: function (event, filter, handler) { - var self = this; + var _this = this; this.icinga.logger.debug('Bound ' + filter + ' .' + event + '()'); this.handlers.push([event, filter, handler]); - $(document).on(event, filter, handler.bind(self.object)); + $(document).on(event, filter, handler.bind(_this.object)); }, /**