浏览代码

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

Johan Ahlen 9 年之前
父节点
当前提交
2c2c874
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      apps/useradmin/src/useradmin/templates/list_configurations.mako

+ 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);