Ver Fonte

AMBARI-16960. There is no public stack versions available on admin view stack versions when using Firefox 24.0 (alexantonenko)

Alex Antonenko há 9 anos atrás
pai
commit
2b0d2d1b5a

+ 21 - 0
ambari-admin/src/main/resources/ui/admin-web/app/scripts/app.js

@@ -131,4 +131,25 @@ angular.module('ambariAdminConsole', [
     }];
     return $delegate;
   }]);
+
+  if (!Array.prototype.find) {
+    Array.prototype.find = function (callback, context) {
+      if (this == null) {
+        throw new TypeError('Array.prototype.find called on null or undefined');
+      }
+      if (typeof callback !== 'function') {
+        throw new TypeError(callback + ' is not a function');
+      }
+      var list = Object(this),
+        length = list.length >>> 0,
+        value;
+      for (var i = 0; i < length; i++) {
+        value = list[i];
+        if (callback.call(context, value, i, list)) {
+          return value;
+        }
+      }
+      return undefined;
+    };
+  }
 }]);