Skip to content

Commit

Permalink
fix for immutable removal, bump to 0.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 6, 2011
1 parent 9f36635 commit 9528471
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ function walk (root, cb, immutable) {
if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);

var child = walker(state.node[key]);
if (immutable) state.node[key] = child.node;
if (immutable && Object.hasOwnProperty.call(state.node, key)) {
state.node[key] = child.node;
}

child.isLast = i == keys.length - 1;
child.isFirst = i == 0;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "traverse",
"version" : "0.3.6",
"version" : "0.3.7",
"description" : "Traverse and transform objects by visiting every node on a recursive walk",
"author" : "James Halliday",
"license" : "MIT/X11",
Expand Down

0 comments on commit 9528471

Please sign in to comment.