From 9ad3400120eadf69614cd3c7ef27efd89dafe83b Mon Sep 17 00:00:00 2001 From: Moorthy Venkatraman Date: Wed, 27 May 2015 10:44:34 -0400 Subject: [PATCH 1/2] Update hasProp to handle object not derived from Object --- object.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object.js b/object.js index 7861e42..5dfb8b0 100644 --- a/object.js +++ b/object.js @@ -259,7 +259,7 @@ define(function (require) { // for better compression function hasProp (object, name) { - return object.hasOwnProperty(name); + return Object.hasOwnProperty.call(object, name); } function _keys (object) { From 81d2a0f9369f5f271c02f39304fc5a50278e7881 Mon Sep 17 00:00:00 2001 From: Moorthy Venkatraman Date: Mon, 15 Jun 2015 10:08:07 -0400 Subject: [PATCH 2/2] Updated to use refProto Replaced direct reference to Object and replaced with refProto variable, which refers to Object.prototype. --- object.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/object.js b/object.js index 5dfb8b0..3ff07f1 100644 --- a/object.js +++ b/object.js @@ -259,7 +259,7 @@ define(function (require) { // for better compression function hasProp (object, name) { - return Object.hasOwnProperty.call(object, name); + return refProto.hasOwnProperty.call(object, name); } function _keys (object) {