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