From 202af046aa52f0e3d5bf9b3ae07263b6fc3da79f Mon Sep 17 00:00:00 2001 From: Jason Kim Date: Tue, 9 Dec 2014 22:26:42 -0800 Subject: [PATCH] Made changes based on jslint --- src/graphDb.js | 4 ++-- src/utils.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/graphDb.js b/src/graphDb.js index 9cfe14d3a..adc2bb3a3 100644 --- a/src/graphDb.js +++ b/src/graphDb.js @@ -55,7 +55,8 @@ exports.addVertex = function (id, text, type, style) { exports.addLink = function (start, end, type, linktext) { //console.log('Got edge', start, end); var edge = {start: start, end: end, type: undefined, text: ''}; - var linktext = type.text; + linktext = type.text; + if (typeof linktext !== 'undefined') { edge.text = linktext; } @@ -204,4 +205,3 @@ exports.clear = function () { exports.defaultStyle = function () { return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"; }; - diff --git a/src/utils.js b/src/utils.js index 73b0057be..e943dfe54 100644 --- a/src/utils.js +++ b/src/utils.js @@ -18,4 +18,4 @@ module.exports.detectType = function(text){ } return "graph"; -} \ No newline at end of file +};