From d25c8f0e8e4f9d559c1d4c9efd821a8393ed06c2 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Mon, 9 Mar 2020 21:25:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20checkColor=20?= =?UTF-8?q?=E6=8E=A5=E6=94=B6=20undefined=20=E6=8A=A5=E9=94=99=E7=9A=84Bug?= =?UTF-8?q?=20askId:=2090328?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/service/api/context/canvas.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/service/api/context/canvas.js b/src/core/service/api/context/canvas.js index a445280566..c75ef87c5f 100644 --- a/src/core/service/api/context/canvas.js +++ b/src/core/service/api/context/canvas.js @@ -192,6 +192,8 @@ const predefinedColor = { } function checkColor (e) { + // 其他开发者适配的echarts会传入一个undefined到这里 + e = e || '#000000' var t = null if ((t = /^#([0-9|A-F|a-f]{6})$/.exec(e)) != null) { let n = parseInt(t[1].slice(0, 2), 16) -- GitLab