use === instead of ==
authorrougeronj
Mon, 05 Jan 2015 10:06:39 +0100
changeset 359 9fc64b41466c
parent 358 e780c82c5b4f
child 360 56e47b1d5ffe
use === instead of ==
client/js/save-once.js
--- a/client/js/save-once.js	Sun Jan 04 22:43:16 2015 +0100
+++ b/client/js/save-once.js	Mon Jan 05 10:06:39 2015 +0100
@@ -66,11 +66,11 @@
     _load();
     _proj.on("add:nodes add:edges add:users change", function(_model) {
 	    _model.on("change remove", function(_model) {
-	    	if(!(_model.changedAttributes.length == 1 && _model.hasChanged('save_status'))) {
+	    	if(!(_model.changedAttributes.length === 1 && _model.hasChanged('save_status'))) {
 	    		_checkLeave();
 	    	}
 	    });
-		if(!(_proj.changedAttributes.length == 1 && _proj.hasChanged('save_status'))) {
+		if(!(_proj.changedAttributes.length === 1 && _proj.hasChanged('save_status'))) {
 		    _checkLeave();
     	}
     });