diff --git a/api/js/etemplate/et2_core_inheritance.js b/api/js/etemplate/et2_core_inheritance.js index 5bcff1db88..93d0bb3033 100644 --- a/api/js/etemplate/et2_core_inheritance.js +++ b/api/js/etemplate/et2_core_inheritance.js @@ -126,7 +126,7 @@ var ClassWithAttributes = /** @class */ (function () { class_prototype = Object.getPrototypeOf(class_prototype); } while (class_prototype !== ClassWithAttributes && n < 50); for (var i = class_tree.length - 1; i >= 0; i--) { - attributes = ClassWithAttributes.extendAttributes(class_tree[i]._attributes, attributes); + attributes = ClassWithAttributes.extendAttributes(attributes, class_tree[i]._attributes); } return attributes; }; @@ -138,7 +138,7 @@ var ClassWithAttributes = /** @class */ (function () { * @param _attributes * @param _parent */ - ClassWithAttributes.extendAttributes = function (_attributes, _parent) { + ClassWithAttributes.extendAttributes = function (_parent, _attributes) { function _copyMerge(_new, _old) { var result = {}; // Copy the new object diff --git a/api/js/etemplate/et2_core_inheritance.ts b/api/js/etemplate/et2_core_inheritance.ts index cd60a9d051..4948401dd7 100644 --- a/api/js/etemplate/et2_core_inheritance.ts +++ b/api/js/etemplate/et2_core_inheritance.ts @@ -168,7 +168,7 @@ export class ClassWithAttributes for(let i = class_tree.length - 1; i >= 0; i--) { - attributes = ClassWithAttributes.extendAttributes(class_tree[i]._attributes,attributes); + attributes = ClassWithAttributes.extendAttributes(attributes, class_tree[i]._attributes); } return attributes; } @@ -180,7 +180,7 @@ export class ClassWithAttributes * @param _attributes * @param _parent */ - static extendAttributes(_attributes : object, _parent : object) : object + static extendAttributes(_parent : object, _attributes : object) : object { function _copyMerge(_new, _old) {