diff --git a/clone.js b/clone.js index 572ad87..b5cf5f7 100644 --- a/clone.js +++ b/clone.js @@ -156,6 +156,9 @@ function clone(parent, circular, depth, prototype, includeNonEnumerable) { child[i] = _clone(parent[i], depth - 1); } + if (Object.keys(parent).indexOf(i) < 0 && attrs && attrs.set == null) { + continue; + try { var objProperty = Object.getOwnPropertyDescriptor(parent, i); if (objProperty.set === 'undefined') {