Skip to content

Commit fbc510f

Browse files
committed
add null check in map._ignoreEvent
1 parent 6428062 commit fbc510f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/map/Map.DomEvents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Map.include(/** @lends Map.prototype */ {
245245
if (target) {
246246
while (target && target !== this._containerDOM) {
247247
if (target.className && target.className.indexOf &&
248-
(target.className.indexOf('maptalks-control') >= 0 || (target.className.indexOf('maptalks-ui') >= 0 && !preTarget['eventsPropagation']))) {
248+
(target.className.indexOf('maptalks-control') >= 0 || (target.className.indexOf('maptalks-ui') >= 0 && preTarget && !preTarget['eventsPropagation']))) {
249249
return true;
250250
}
251251
preTarget = target;

src/map/Map.Topo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { INTERNAL_LAYER_PREFIX } from '../core/Constants';
2-
import { extend, isString, isArrayHasData, pushIn } from '../core/util';
2+
import { isString, isArrayHasData, pushIn } from '../core/util';
33
import Coordinate from '../geo/Coordinate';
44
import Point from '../geo/Point';
55
import Map from './Map';

0 commit comments

Comments
 (0)