From 969f365b3ee6d3cb54f98b23e1ebb97df9f801dd Mon Sep 17 00:00:00 2001
From: =?utf8?q?Aleksander=20=C5=81ukasz?=
 <aleksander.lukasz@nowoczesnapolska.org.pl>
Date: Sun, 30 Jun 2013 23:44:39 +0200
Subject: [PATCH] Some code improvements suggested by linter

---
 modules/data/data.js                     | 2 +-
 modules/documentCanvas/canvas.js         | 2 +-
 modules/nodeFamilyTree/nodeFamilyTree.js | 2 +-
 modules/rng/rng.js                       | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/data/data.js b/modules/data/data.js
index 51a4398..8bd553c 100644
--- a/modules/data/data.js
+++ b/modules/data/data.js
@@ -30,7 +30,7 @@ return function(sandbox) {
         for (var i = 0; i < ca.length; i++) {
             var c = ca[i];
             while (c.charAt(0) == ' ') c = c.substring(1, c.length);
-            if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length, c.length));
+            if (c.indexOf(nameEQ) === 0) return unescape(c.substring(nameEQ.length, c.length));
         }
         return null;
     }
diff --git a/modules/documentCanvas/canvas.js b/modules/documentCanvas/canvas.js
index 94329a4..4a953d1 100644
--- a/modules/documentCanvas/canvas.js
+++ b/modules/documentCanvas/canvas.js
@@ -143,7 +143,7 @@ Canvas.prototype.nodeRemove = function(options) {
 Canvas.prototype.listCreate = function(options) {
     var element1 = $(this.content.find('#' + options.start.getId()).get(0));
     var element2 = $(this.content.find('#' + options.end.getId()).get(0));
-    if(!element1.parent().get(0) === element2.parent().get(0))
+    if(element1.parent().get(0) !== element2.parent().get(0))
         return false;
         
     var parent = element1.parent();
diff --git a/modules/nodeFamilyTree/nodeFamilyTree.js b/modules/nodeFamilyTree/nodeFamilyTree.js
index 05d4aac..049352e 100644
--- a/modules/nodeFamilyTree/nodeFamilyTree.js
+++ b/modules/nodeFamilyTree/nodeFamilyTree.js
@@ -33,7 +33,7 @@ return function(sandbox) {
             var nodes = this.nodes = {};
             this.currentNode = node;
             var parentNode = node.parent();
-            var parent = undefined;
+            var parent;
             
             if(parentNode) {
                 parent = {
diff --git a/modules/rng/rng.js b/modules/rng/rng.js
index 191c449..980e6ff 100644
--- a/modules/rng/rng.js
+++ b/modules/rng/rng.js
@@ -38,7 +38,7 @@ return function(sandbox) {
                 dirty.sourceEditor = false;
             }
             if(slug === 'editor') {
-                var doc = dirty.documentCanvas ? sandbox.getModule('documentCanvas').getDocument() : sandbox.getModule('data').getDocument();
+                doc = dirty.documentCanvas ? sandbox.getModule('documentCanvas').getDocument() : sandbox.getModule('data').getDocument();
                 if(dirty.metadataEditor) {
                     doc = sandbox.getModule('metadataEditor').attachMetadata(doc);
                 }
-- 
2.20.1