Ver código fonte

HUE-3850 [core] App configuration page fails to load with JS error

Johan Ahlen 9 anos atrás
pai
commit
2c2c874

+ 6 - 5
apps/useradmin/src/useradmin/templates/list_configurations.mako

@@ -233,15 +233,16 @@ ${ configKoComponents.config() }
       });
       $.each(data.configuration, function (appName, app) {
 
-        // Merge base properties with default properties into default
-        var defaultIndex = {};
-        app.default.forEach(function (defaultProperty) {
-          defaultIndex[defaultProperty.name] = defaultProperty;
-        });
         app.name = appName;
+        var defaultIndex = {};
         if (typeof app.default === 'undefined') {
           app.default = [];
         }
+
+        // Merge base properties with default properties into default
+        app.default.forEach(function (defaultProperty) {
+          defaultIndex[defaultProperty.name] = defaultProperty;
+        });
         app.properties.forEach(function (property) {
           if (!defaultIndex[property.name]) {
             app.default.push(property);