[Pkg-javascript-commits] [leaflet] 51/78: move check so as not to create a function
Jonas Smedegaard
dr at jones.dk
Sat May 7 08:58:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit f55bf723ab72cd642a5ede8db9e67cf1d72f117e
Author: Robert Plummer <robertleeplummerjr at gmail.com>
Date: Mon Dec 28 13:08:20 2015 -0500
move check so as not to create a function
---
src/layer/vector/canvas/Path.Canvas.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/layer/vector/canvas/Path.Canvas.js b/src/layer/vector/canvas/Path.Canvas.js
index 9b3427d..291263b 100644
--- a/src/layer/vector/canvas/Path.Canvas.js
+++ b/src/layer/vector/canvas/Path.Canvas.js
@@ -36,8 +36,8 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
.off('viewreset', this.projectLatlngs, this)
.off('moveend', this._updatePath, this);
- if (this.options.clickable) {
- this._map.off('click', this._onClick || function() {}, this);
+ if (this.options.clickable && this._onClick !== undefined) {
+ this._map.off('click', this._onClick, this);
this._map.off('mousemove', this._onMouseMove, this);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list