[Pkg-javascript-commits] [backbone] 59/173: Change `_.invoke` use to `_.map`.

Jonas Smedegaard dr at jones.dk
Wed Aug 31 07:44:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository backbone.

commit 1be3730cef4f64fadbcef7c911d5095d62a791e7
Author: John-David Dalton <john.david.dalton at gmail.com>
Date:   Mon Nov 23 16:37:14 2015 -0800

    Change `_.invoke` use to `_.map`.
---
 backbone.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/backbone.js b/backbone.js
index 9b77eac..c7f8d7c 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1011,7 +1011,9 @@
 
     // Pluck an attribute from each model in the collection.
     pluck: function(attr) {
-      return _.invoke(this.models, 'get', attr);
+      return _.map(this.models, function(model) {
+        return model.get(attr);
+      });
     },
 
     // Fetch the default set of models for this collection, resetting the

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list