3618: replace js use of == and != with the more predictable === and !==
authorPhil Hodgson <bitbucket@philhodgson.net>
Fri, 24 Oct 2014 17:40:01 +0000 (19:40 +0200)
committerPhil Hodgson <bitbucket@philhodgson.net>
Fri, 24 Oct 2014 17:40:01 +0000 (19:40 +0200)
apps/workbench/app/assets/javascripts/infinite_scroll.js

index 2ca45484baaa974b842c74bb3c35b5f926d17f31..fd37308bfe6b0cee9c9fa12f83616034c35104cd 100644 (file)
@@ -192,7 +192,7 @@ $(document).
     on('click', 'th[data-sort-order]', function() {
         var direction = $(this).data('sort-order-direction');
         // reverse the current direction, or do ascending if none
-        if( typeof(direction) == 'undefined' || direction == 'desc' ) {
+        if( typeof(direction) === 'undefined' || direction === 'desc' ) {
             direction = 'asc';
         } else {
             direction = 'desc';
@@ -210,7 +210,7 @@ $(document).
         $('th[data-sort-order]').each(function() {
             $(this).find('i').remove();
             var direction = $(this).data('sort-order-direction');
-            if( typeof(direction) != 'undefined' ) {
+            if( typeof(direction) !== 'undefined' ) {
                 $(this).append('<i class="fa fa-sort-' + direction + '"/>');
             } else {
                 $(this).append('<i class="fa fa-sort"/>');