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 2021/04/27 04:30:44 UTC
[echarts] 01/01: fix(legend): remove unexpected `startsWith` syntax
in `LegendView`, use `lastIndexOf(search, 0) === 0` instead.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix-grammar
in repository https://gitbox.apache.org/repos/asf/echarts.git
commit 404dd529772e80de6fab05eb4db9e1247d654486
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Tue Apr 27 12:28:27 2021 +0800
fix(legend): remove unexpected `startsWith` syntax in `LegendView`, use `lastIndexOf(search, 0) === 0` instead.
---
src/component/legend/LegendView.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/component/legend/LegendView.ts b/src/component/legend/LegendView.ts
index 7d7cab4..6dd9c9f 100644
--- a/src/component/legend/LegendView.ts
+++ b/src/component/legend/LegendView.ts
@@ -573,7 +573,7 @@ function getLegendStyle(
* in visual style
*/
itemStyle.stroke = itemVisualStyle[
- symbolType.startsWith('empty') ? 'fill' : 'stroke'
+ symbolType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke'
];
break;
@@ -729,4 +729,4 @@ function dispatchDownplayAction(
}
}
-export default LegendView;
\ No newline at end of file
+export default LegendView;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org