diff --git a/lib/apply.js b/lib/apply.js index a6b29c6..b3b5b53 100644 --- a/lib/apply.js +++ b/lib/apply.js @@ -15,6 +15,9 @@ module.exports = function apply(target, patch) { var keys = Object.keys(patch); for (var i = 0; i < keys.length; i++) { var key = keys[i]; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return target; + } if (patch[key] === null) { if (target.hasOwnProperty(key)) { delete target[key];