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 2020/07/31 10:15:59 UTC
[incubator-echarts] 10/10: fix: prevent potential issue after the
implementation of isString change.
This is an automated email from the ASF dual-hosted git repository.
sushuang pushed a commit to branch dataset-trans
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 246667e768cc418668d89900750a37f6feef8893
Author: 100pah <su...@gmail.com>
AuthorDate: Fri Jul 31 18:14:03 2020 +0800
fix: prevent potential issue after the implementation of isString change.
---
src/util/model.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/model.ts b/src/util/model.ts
index 699b297..83a615f 100644
--- a/src/util/model.ts
+++ b/src/util/model.ts
@@ -26,7 +26,8 @@ import {
map,
assert,
isString,
- indexOf
+ indexOf,
+ isStringSafe
} from 'zrender/src/core/util';
import env from 'zrender/src/core/env';
import GlobalModel from '../model/Global';
@@ -527,7 +528,7 @@ export function validateIdOrName(idOrName: unknown) {
}
function isValidIdOrName(idOrName: unknown): boolean {
- return isString(idOrName) || isNumeric(idOrName);
+ return isStringSafe(idOrName) || isNumeric(idOrName);
}
export function isNameSpecified(componentModel: ComponentModel): boolean {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org