Browse Source

Fix minor linting errors.

Bentley James Oakes 7 years ago
parent
commit
8a1a265956
3 changed files with 14 additions and 6 deletions
  1. 1 1
      client/gui_utils.js
  2. 9 3
      client/selection_utils.js
  3. 4 2
      client/window_event.js

+ 1 - 1
client/gui_utils.js

@@ -187,7 +187,7 @@ GUIUtils = function(){
 		else if( type.match(/^\$/) )
 			return GUIUtils.getInputField(__specialTypes[type],value);
 	
-		else if (matches = type.match("^file<(.*)>")) {
+		else if ((matches = type.match("^file<(.*)>"))) {
 			var input 	 = GUIUtils.getFileInput(value,matches[1],"code_style string_input",1),
 				 getinput = function(_){return _.val();};
         }

+ 9 - 3
client/selection_utils.js

@@ -153,7 +153,9 @@ function __flash(uri,color,timeout)
 	function turnOff()
 	{
 		try			{__icons[uri]['icon'].unhighlight();} 
-		catch(err)	{}
+		catch(err)	{
+			console.log(err);
+		}
 	}
 	window.setTimeout(turnOff,timeout || 500);
 }
@@ -199,13 +201,17 @@ function __highlight(uri,followCrossFormalismLinks,timeout,color)
 				 function() 
 				 {
 					 try			{__icons[uri]['icon'].unhighlight();}
-					 catch(err)	{}
+					 catch(err)	{
+					 	console.log(err);
+					 }
 
 					 if( followCrossFormalismLinks != undefined )
 					 	neighbors.nodes.forEach( 
 							function(n) {
 	  							try			{__icons[n]['icon'].unhighlight();}
-								catch(err)	{}
+								catch(err)	{
+	  								console.log(err);
+								}
 							} );
 					 if( timeout != undefined )
 						 window.clearTimeout(tid);

+ 4 - 2
client/window_event.js

@@ -25,8 +25,10 @@ WindowEventHelper = function(){
 				
 				// Are we actually in the table?
 				if( table != null && table.rows != undefined){
-					for(var i=0, row; row = table.rows[i]; i++){
-						
+					for(var i=0; i < table.length; i++){
+
+						let row = table.rows[i];
+
 						// Is the current row the parent row of the active element?
 						if( row == activeElement.parentNode.parentNode ){
 							if( currentKeys[ KEY_SHIFT ] == 1){