You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2020/09/29 03:41:23 UTC
[incubator-echarts] branch next updated: fix(bar): fix null access
bug
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch next
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/next by this push:
new b717a5c fix(bar): fix null access bug
b717a5c is described below
commit b717a5c3f2cb1609b77beb44d01f53da92bd0bd6
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Sep 29 11:41:07 2020 +0800
fix(bar): fix null access bug
---
src/chart/bar/BarView.ts | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/chart/bar/BarView.ts b/src/chart/bar/BarView.ts
index 0aae1cd..2d48aaa 100644
--- a/src/chart/bar/BarView.ts
+++ b/src/chart/bar/BarView.ts
@@ -845,9 +845,11 @@ function updateStyle(
);
const label = el.getTextContent();
- const obj = labelInner(label);
- obj.prevValue = obj.value;
- obj.value = seriesModel.getRawValue(dataIndex) as ParsedValue | ParsedValue[];
+ if (label) {
+ const obj = labelInner(label);
+ obj.prevValue = obj.value;
+ obj.value = seriesModel.getRawValue(dataIndex) as ParsedValue | ParsedValue[];
+ }
}
const emphasisModel = itemModel.getModel(['emphasis']);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org