Skip to content

Commit

Permalink
Merge branch 'fix/for-in'
Browse files Browse the repository at this point in the history
Merges pull request #3
  • Loading branch information
mcmath committed Jun 16, 2016
2 parents 12aca80 + aa0d6ca commit 88d98a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/deep-map-keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ function mapObject(obj: {[key: string]: any}, fn: MapFn, opts: Options): {[key:
let result: {[key: string]: any} = {};

for (let key in obj) {
let value = obj[key];
result[fn.call(opts.thisArg, key, value)] = map(value, fn, opts);
if (obj.hasOwnProperty(key)) {
let value = obj[key];
result[fn.call(opts.thisArg, key, value)] = map(value, fn, opts);
}
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}],
"ban": false,
"curly": false,
"forin": false,
"forin": true,
"label-position": true,
"no-arg": true,
"no-bitwise": false,
Expand Down

0 comments on commit 88d98a6

Please sign in to comment.