mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Hopefully last attribute inheritance bug fix, solves a lot of the console warnings.
Just swapping the function parameter order, since we called the function from every constructor.
This commit is contained in:
parent
81b12cf9ee
commit
39590368bf
@ -126,7 +126,7 @@ var ClassWithAttributes = /** @class */ (function () {
|
|||||||
class_prototype = Object.getPrototypeOf(class_prototype);
|
class_prototype = Object.getPrototypeOf(class_prototype);
|
||||||
} while (class_prototype !== ClassWithAttributes && n < 50);
|
} while (class_prototype !== ClassWithAttributes && n < 50);
|
||||||
for (var i = class_tree.length - 1; i >= 0; i--) {
|
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;
|
return attributes;
|
||||||
};
|
};
|
||||||
@ -138,7 +138,7 @@ var ClassWithAttributes = /** @class */ (function () {
|
|||||||
* @param _attributes
|
* @param _attributes
|
||||||
* @param _parent
|
* @param _parent
|
||||||
*/
|
*/
|
||||||
ClassWithAttributes.extendAttributes = function (_attributes, _parent) {
|
ClassWithAttributes.extendAttributes = function (_parent, _attributes) {
|
||||||
function _copyMerge(_new, _old) {
|
function _copyMerge(_new, _old) {
|
||||||
var result = {};
|
var result = {};
|
||||||
// Copy the new object
|
// Copy the new object
|
||||||
|
@ -168,7 +168,7 @@ export class ClassWithAttributes
|
|||||||
|
|
||||||
for(let i = class_tree.length - 1; i >= 0; i--)
|
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;
|
return attributes;
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ export class ClassWithAttributes
|
|||||||
* @param _attributes
|
* @param _attributes
|
||||||
* @param _parent
|
* @param _parent
|
||||||
*/
|
*/
|
||||||
static extendAttributes(_attributes : object, _parent : object) : object
|
static extendAttributes(_parent : object, _attributes : object) : object
|
||||||
{
|
{
|
||||||
function _copyMerge(_new, _old)
|
function _copyMerge(_new, _old)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user