fix experimental object spread/rest helper

This commit is contained in:
Sebastian McKenzie
2014-11-23 21:50:49 +11:00
parent a2b0ee6809
commit 7f57d3d6a2
3 changed files with 12 additions and 8 deletions

View File

@@ -1,9 +1,9 @@
(function (target, keys) {
(function (obj, keys) {
var target = {};
for (var i in target) {
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwn.call(target)) continue;
target[i] = target[i];
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
})