mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 20:08:34 +01:00
If the default is an object, use a clone of the default value to prevent widget from accidentally changing the default by reference
This commit is contained in:
parent
ed85cc3ce6
commit
e004e23c31
@ -124,7 +124,9 @@ var ClassWithAttributes = Class.extend(
|
|||||||
_default = undefined;
|
_default = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
_attrs[key] = _default;
|
// Use extend() to avoid a reference to default.
|
||||||
|
// Widget might change it, and alter the default
|
||||||
|
_attrs[key] = typeof _default == "object" ? jQuery.extend(true,{},_default) : _default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user