From e5e7a615d4cb29fafb57326c44efdf9294db02ec Mon Sep 17 00:00:00 2001 From: Tim Lucas Date: Thu, 20 Mar 2014 15:55:06 +1100 Subject: [PATCH] Replace getOwnPropertyDescriptor with hasOwnProperty --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index b05938a..fba2fb2 100644 --- a/index.js +++ b/index.js @@ -86,10 +86,10 @@ function promote(parent, key) { function parse(parts, parent, key, val) { var part = parts.shift(); - + // illegal - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; - + if (hasOwnProperty.call(Object.prototype, key)) return; + // end if (!part) { if (isArray(parent[key])) { @@ -319,7 +319,7 @@ function stringifyObject(obj, prefix) { function set(obj, key, val) { var v = obj[key]; - if (Object.getOwnPropertyDescriptor(Object.prototype, key)) return; + if (hasOwnProperty.call(Object.prototype, key)) return; if (undefined === v) { obj[key] = val; } else if (isArray(v)) {