check for undefined el.tagName prevents iPad error

This commit is contained in:
Dag Jomar Mersland 2013-08-21 13:30:10 +02:00
parent 8ccb7e0583
commit 5180cce838

View File

@ -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');
}