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/07/29 12:33:53 UTC
[incubator-echarts] branch next updated: fix(legend): fix logic
issue caused null pointer access.
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 ca10b34 fix(legend): fix logic issue caused null pointer access.
ca10b34 is described below
commit ca10b34893bae99189c54939ffe926bca64f2a31
Author: pissang <bm...@gmail.com>
AuthorDate: Wed Jul 29 20:33:27 2020 +0800
fix(legend): fix logic issue caused null pointer access.
---
src/component/legend/LegendView.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts
index 6bb9326..54a2f38 100644
--- a/src/component/legend/LegendView.ts
+++ b/src/component/legend/LegendView.ts
@@ -589,7 +589,7 @@ function isUseHoverLayer(api: ExtensionAPI) {
let emphasisState: DisplayableState;
let i = 0;
const len = list.length;
- while (!(emphasisState = list[i].states.emphasis) && i < len) {
+ while (i < len && !(emphasisState = list[i].states.emphasis)) {
i++;
}
return emphasisState && emphasisState.hoverLayer;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org