Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
setValueFrom must check isObject as it traverse path and sets value (…
Browse files Browse the repository at this point in the history
…fixes Safari failure)

R=arv
BUG=

Review URL: https://codereview.appspot.com/13306052
  • Loading branch information
rafaelw committed Sep 12, 2013
1 parent 8e793ed commit 0ac1ea1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@
return false;

for (var i = 0; i < this.length - 1; i++) {
if (obj === undefined || obj === null)
if (!isObject(obj))
return false;
obj = obj[this[i]];
}

if (obj === undefined || obj === null)
if (!isObject(obj))
return false;

obj[this[this.length - 1]] = value;
obj[this[i]] = value;
return true;
}
});
Expand Down

0 comments on commit 0ac1ea1

Please sign in to comment.