documentcloud/backbone — pull request #2497 by nickfun (2013-04-22 19:40:03+00:00)
Title: collection.add has different behavior for passing in array vs non-array

Calling add with an array of false values will not create empty objects.

Currently, you can call collection.add with a false (or false-y value) and it result in a no-op

myCollection.add( false ); // nothing is added to the collection

but this behavior does not extend to adding an array with false-y values

myCollection.add( [false, false] ); // two empty models are created and added to the collection

My pull request changes collection.add so that if an array contains false-y data then empty models will not be created & added.