-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Calling collection.reset()
without arguments causes a wrong behaviour due to line 588 of query-engine.js.
(QueryCollection.prototype.add
). It looks the problem is the condition that forces the creation of an array when models
argument is not one (:[models]
). It creates an array even in the case the models
argument of add
method is undefined
. This causes the array to have 1 phantom element ({}
).
Fortunately there is an easy workaround, to call reset
method with an an empty array (collection.reset([])
). This way the condition that gets evaluated is ?models.slice()
and that returns an empty array which is the expected behaviour.
Are you accepting pull requests? I see many issues open.