[Pkg-javascript-commits] [leaflet] 71/301: check for undefined el.tagName prevents iPad error

Jonas Smedegaard js at moszumanska.debian.org
Mon Jan 27 22:22:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 5180cce838cb2694e5faf522cb72a3dfec83b007
Author: Dag Jomar Mersland <dagjomar at gmail.com>
Date:   Wed Aug 21 13:30:10 2013 +0200

    check for undefined el.tagName prevents iPad error
---
 src/map/handler/Map.Tap.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/map/handler/Map.Tap.js b/src/map/handler/Map.Tap.js
index 54dbb0f..90e9e55 100644
--- a/src/map/handler/Map.Tap.js
+++ b/src/map/handler/Map.Tap.js
@@ -36,7 +36,7 @@ L.Map.Tap = L.Handler.extend({
 		this._startPos = this._newPos = new L.Point(first.clientX, first.clientY);
 
 		// if touching a link, highlight it
-		if (el.tagName.toLowerCase() === 'a') {
+		if (el.tagName && el.tagName.toLowerCase() === 'a') {
 			L.DomUtil.addClass(el, 'leaflet-active');
 		}
 

-- 
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