From 4766991cae3260074e0a82201dcfde914ed41711 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Mon, 5 Dec 2016 08:22:15 -0800 Subject: [PATCH] Fix utils.js mergeObjects not checking hasOwnProperty --- unpublishedScripts/marketplace/bow/utils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/unpublishedScripts/marketplace/bow/utils.js b/unpublishedScripts/marketplace/bow/utils.js index f39f4d7913..f070563f82 100644 --- a/unpublishedScripts/marketplace/bow/utils.js +++ b/unpublishedScripts/marketplace/bow/utils.js @@ -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; }