You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by ov...@apache.org on 2019/05/27 09:26:06 UTC
[incubator-echarts] 01/01: fix: bug when graph data is number
typed. Fix #10485
This is an automated email from the ASF dual-hosted git repository.
ovilia pushed a commit to branch fix-10485
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
commit 46407450b364e32f20c2a1ba17c5a328bfb726f1
Author: Ovilia <zw...@gmail.com>
AuthorDate: Mon May 27 17:25:02 2019 +0800
fix: bug when graph data is number typed. Fix #10485
---
src/data/Graph.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/data/Graph.js b/src/data/Graph.js
index 310a2fc..d86ab0c 100644
--- a/src/data/Graph.js
+++ b/src/data/Graph.js
@@ -101,7 +101,7 @@ graphProto.isDirected = function () {
* @param {number} [dataIndex]
*/
graphProto.addNode = function (id, dataIndex) {
- id = id || ('' + dataIndex);
+ id = id == null ? ('' + dataIndex) : ('' + id);
var nodesMap = this._nodesMap;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org