diff --git a/underscore.js b/underscore.js index 720801588..24dcc72be 100644 --- a/underscore.js +++ b/underscore.js @@ -876,7 +876,8 @@ // Get a value from an object as a property or as a function. _.getValue = function(object, prop) { if (object == null) return null; - return _.isFunction(object[prop]) ? object[prop]() : object[prop]; + var value = object[prop]; + return _.isFunction(value) ? value() : value; }; // Add your own custom functions to the Underscore object, ensuring that