Skip to content

Commit

Permalink
Fix evaluatePath to allow falsy values
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Rosen committed Jan 2, 2013
1 parent bf1cc47 commit ff3e2f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backbone.stickit.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
// Evaluates the given `path` (in object/dot-notation) relative to the given `obj`.
var evaluatePath = function(obj, path) {
var pathParts = (path || '').split('.');
return _.reduce(pathParts, function(memo, i) { return memo[i]; }, obj) || obj;
return _.reduce(pathParts, function(memo, i) { return memo[i]; }, obj);
};

// If the given `fn` is a string, then view[fn] is called, otherwise it is a function
Expand Down

0 comments on commit ff3e2f7

Please sign in to comment.