Browse Source

HUE-5626 [editor] Fix Firefox JS error in autocomplete dropdown

Johan Ahlen 9 years ago
parent
commit
4c6f20b1f5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      desktop/core/src/desktop/static/desktop/js/sqlAutocompleter3.js

+ 4 - 1
desktop/core/src/desktop/static/desktop/js/sqlAutocompleter3.js

@@ -177,7 +177,10 @@ var SqlAutocompleter3 = (function () {
           }
         }
       });
-      var result = Object.values(newCategories);
+      var result = [];
+      Object.keys(newCategories).forEach(function (key) {
+        result.push(newCategories[key]);
+      });
       result.sort(function (a, b) { return a.label.localeCompare(b.label)});
       result.unshift(CATEGORIES.ALL);
       return result;