From ff3e2f70c6863d36c41985c97aed64fbeccd6444 Mon Sep 17 00:00:00 2001 From: Joel Rosen Date: Wed, 2 Jan 2013 09:51:54 -0500 Subject: [PATCH] Fix evaluatePath to allow falsy values --- backbone.stickit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.stickit.js b/backbone.stickit.js index 71e1ae9..4871700 100644 --- a/backbone.stickit.js +++ b/backbone.stickit.js @@ -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