You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/11/25 14:22:49 UTC

[echarts] 03/03: fix(core): use `!=` to check if series is excluded as native map returns `undefined` rather than `null`

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

wangzx pushed a commit to branch fix-null-check
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit c0a9277cc63db8307dd3642684ebc467e2c38f91
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Fri Nov 25 22:18:45 2022 +0800

    fix(core): use `!=` to check if series is excluded as native map returns `undefined` rather than `null`
---
 src/core/echarts.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/echarts.ts b/src/core/echarts.ts
index e84c1c89e..7775e6d50 100644
--- a/src/core/echarts.ts
+++ b/src/core/echarts.ts
@@ -1580,7 +1580,7 @@ class ECharts extends Eventful<ECEventDefinition> {
 
             // If dispatchAction before setOption, do nothing.
             ecModel && ecModel.eachComponent(condition, function (model) {
-                const isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) !== null;
+                const isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null;
                 if (isExcluded) {
                     return;
                 };
@@ -1624,7 +1624,7 @@ class ECharts extends Eventful<ECEventDefinition> {
             }, ecIns);
 
             ecModel && ecModel.eachComponent(condition, function (model) {
-                const isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) !== null;
+                const isExcluded = excludeSeriesIdMap && excludeSeriesIdMap.get(model.id) != null;
                 if (isExcluded) {
                     return;
                 };


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