mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fix utils.js mergeObjects not checking hasOwnProperty
This commit is contained in:
parent
fee9dcc981
commit
4766991cae
1 changed files with 6 additions and 2 deletions
|
@ -98,10 +98,14 @@ getEntityCustomData = function(customKey, id, defaultValue) {
|
|||
mergeObjects = function(proto, custom) {
|
||||
var result = {};
|
||||
for (var attrname in proto) {
|
||||
result[attrname] = proto[attrname];
|
||||
if (proto.hasOwnProperty(attrname)) {
|
||||
result[attrname] = proto[attrname];
|
||||
}
|
||||
}
|
||||
for (var attrname in custom) {
|
||||
result[attrname] = custom[attrname];
|
||||
if (custom.hasOwnProperty(attrname)) {
|
||||
result[attrname] = custom[attrname];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue