From 5c6f161f2006df87f231317f3413bc38ad799b7d Mon Sep 17 00:00:00 2001 From: Stephen Sugden Date: Wed, 2 May 2012 11:43:12 -0700 Subject: [PATCH] Fix crash when node is a string and this.update is called with an object. --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index b629542..86e27b6 100644 --- a/index.js +++ b/index.js @@ -191,6 +191,8 @@ function walk (root, cb, immutable) { && state.node !== null && !state.circular) { parents.push(state); + if (!state.keys) state.keys = Object_keys(state.node); + forEach(state.keys, function (key, i) { path.push(key);