diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-06-06 19:48:39 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-06 10:17:30 -0700 |
commit | 60e512c6f4f334b23ac582ce2fd33515ae8077ae (patch) | |
tree | 028d1a09ec4750ea6acb94e9e6ce945e77dc7f4d /theme/list_lib.js | |
parent | 8432e23c0954c9126c43c8038400f1c2312ee604 (diff) | |
download | subsurface-60e512c6f4f334b23ac582ce2fd33515ae8077ae.tar.gz |
HTML: prevent implicit type conversion on testing
== comparison of true, false, null, allows implicit type conversion,
thus using === instead
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'theme/list_lib.js')
-rw-r--r-- | theme/list_lib.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/theme/list_lib.js b/theme/list_lib.js index 1a07dc384..9d02f0683 100644 --- a/theme/list_lib.js +++ b/theme/list_lib.js @@ -345,11 +345,11 @@ function sort_it(sortOn,function_){ } for(var i=0;i< itemsToShow.length ;i++){ for(var j=0;j<itemsToShow.length;j++) - if(visited[j] == false) + if(visited[j] === false) var iSmaller=j; for(var j=0;j<itemsToShow.length;j++){ if(function_(itemsToShow[j],itemsToShow[iSmaller])){ - if(visited[j] == false){ + if(visited[j] === false){ iSmaller = j; } } @@ -390,7 +390,7 @@ Set.prototype.forEach = function(do_){ }; Set.prototype.Union = function(another_set){ - if (another_set == null) { + if (another_set === null) { return; } for(var i=0; i<another_set.keys.length ;i++){ @@ -427,19 +427,19 @@ function SearchModules(searchfor){ resultKeys.Union(x.search(searchfor)); }); - if(searchingModules["location"].enabled==true) + if(searchingModules["location"].enabled===true) resultKeys.Union(searchingModules["location"].search(searchfor)); - if(searchingModules["divemaster"].enabled==true) + if(searchingModules["divemaster"].enabled===true) resultKeys.Union(searchingModules["divemaster"].search(searchfor)); - if(searchingModules["buddy"].enabled==true) + if(searchingModules["buddy"].enabled===true) resultKeys.Union(searchingModules["buddy"].search(searchfor)); - if(searchingModules["notes"].enabled==true) + if(searchingModules["notes"].enabled===true) resultKeys.Union(searchingModules["notes"].search(searchfor)); - if(searchingModules["tags"].enabled==true) + if(searchingModules["tags"].enabled===true) resultKeys.Union(searchingModules["tags"].search(searchfor)); if(resultKeys.isEmpty()){ @@ -545,7 +545,7 @@ function showtrips(){ } function toggle_trip_expansion(trip){ - if(trips[trip].expanded ==true){ + if(trips[trip].expanded ===true){ unexpand_trip(trip); }else{ expand_trip(trip); |