mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-10 00:37:54 +02: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:
@ -124,7 +124,9 @@ var ClassWithAttributes = Class.extend(
|
||||
_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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user