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:05 UTC

[incubator-echarts] branch fix-10485 created (now 4640745)

This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a change to branch fix-10485
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git.


      at 4640745  fix: bug when graph data is number typed. Fix #10485

This branch includes the following new commits:

     new 4640745  fix: bug when graph data is number typed. Fix #10485

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[incubator-echarts] 01/01: fix: bug when graph data is number typed. Fix #10485

Posted by ov...@apache.org.
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