From 9d6e9e4cfa583d4f2440249e380bbe90abe97331 Mon Sep 17 00:00:00 2001 From: Serg Date: Tue, 5 Apr 2016 17:32:59 +0300 Subject: [PATCH] Remove callback from global skope Remove callback from global skope --- src/Map.ContextMenu.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Map.ContextMenu.js b/src/Map.ContextMenu.js index 735a332..3e68d17 100644 --- a/src/Map.ContextMenu.js +++ b/src/Map.ContextMenu.js @@ -224,9 +224,8 @@ L.Map.ContextMenu = L.Handler.extend({ if (item.id === id) { el = item.el; - callback = item.callback; - if (callback) { + if (item.callback) { L.DomEvent .off(el, 'mouseover', this._onItemMouseOver, this) .off(el, 'mouseover', this._onItemMouseOut, this)