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 2021/05/22 07:28:02 UTC

[echarts] 01/01: fix: [custom series] fix null pointer exception when renderItem returns nothing in progressive rendering. Fix #12221

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch fix/custom-progressive
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit a06d74d2476e335a1cbbdc6ebb2694d1ad8e7628
Author: 100pah <su...@gmail.com>
AuthorDate: Sat May 22 15:27:20 2021 +0800

    fix: [custom series] fix null pointer exception when renderItem returns nothing in progressive rendering. Fix #12221
---
 src/chart/custom/install.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chart/custom/install.ts b/src/chart/custom/install.ts
index d3cf024..50cbfac 100644
--- a/src/chart/custom/install.ts
+++ b/src/chart/custom/install.ts
@@ -628,7 +628,7 @@ class CustomSeriesView extends ChartView {
             const el = createOrUpdateItem(
                 null, null, idx, renderItem(idx, payload), customSeries, this.group, data, null
             );
-            el.traverse(setIncrementalAndHoverLayer);
+            el && el.traverse(setIncrementalAndHoverLayer);
         }
     }
 
@@ -1937,7 +1937,7 @@ function createOrUpdateItem(
     el = doCreateOrUpdateEl(api, el, dataIndex, elOption, seriesModel, group, true, morphPreparation);
     el && data.setItemGraphicEl(dataIndex, el);
 
-    enableHoverEmphasis(el, elOption.focus, elOption.blurScope);
+    el && enableHoverEmphasis(el, elOption.focus, elOption.blurScope);
 
     return el;
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org