[Pkg-javascript-commits] [backbone] 30/173: make empty collection arguments consistent

Jonas Smedegaard dr at jones.dk
Wed Aug 31 07:43:58 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 bb2c1b96183d0dd92d64b8ef06b7ba4d76f274db
Author: Adam Krebs <amk528 at cs.nyu.edu>
Date:   Wed Oct 7 11:56:01 2015 -0400

    make empty collection arguments consistent
---
 index.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html
index 33320ab..b7481a6 100644
--- a/index.html
+++ b/index.html
@@ -1822,12 +1822,12 @@ alert(library.get('dvd-1').id + ' ' + library.get('vhs-1').id);
       <b>initialize</b> function, it will be invoked when the collection is
       created. There are a couple of options that, if provided, are attached to
       the collection directly: <tt>model</tt> and <tt>comparator</tt>.<br />
-      Pass <tt>[]</tt> for <tt>models</tt> to create an empty Collection with <tt>options</tt>.
+      Pass <tt>null</tt> for <tt>models</tt> to create an empty Collection with <tt>options</tt>.
     </p>
 
 <pre>
 var tabs = new TabSet([tab1, tab2, tab3]);
-var spaces = new Backbone.Collection([], {
+var spaces = new Backbone.Collection(null, {
   model: Space
 });
 </pre>

-- 
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