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 <sushuang0...@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-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to