You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2020/11/20 14:14:50 UTC
[incubator-echarts] 01/01: fix: fix NPE when click an area in geo
map.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch fix/geo-click-error
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit c0dd9a382be5d3ce682cf2b1b5b8b93951061b1b
Author: 100pah <su...@gmail.com>
AuthorDate: Fri Nov 20 21:31:45 2020 +0800
fix: fix NPE when click an area in geo map.
---
src/component/geo/GeoView.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/component/geo/GeoView.ts b/src/component/geo/GeoView.ts
index 2597733..c1ca7e6 100644
--- a/src/component/geo/GeoView.ts
+++ b/src/component/geo/GeoView.ts
@@ -69,7 +69,7 @@ class GeoView extends ComponentView {
let current = e.target;
let eventData: ECEventData;
// TODO extract a util function
- while ((eventData = getECData(current).eventData) == null) {
+ while (current && (eventData = getECData(current).eventData) == null) {
current = current.__hostTarget || current.parent;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org