mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Optionify the barely-used LocalCollection name arg
This commit is contained in:
@@ -7,11 +7,11 @@
|
||||
|
||||
// ObserveHandle: the return value of a live query.
|
||||
|
||||
LocalCollection = function (name, options) {
|
||||
LocalCollection = function (options) {
|
||||
var self = this;
|
||||
options = options || {};
|
||||
|
||||
self.name = name;
|
||||
self.name = options.name;
|
||||
// _id -> document (also containing id)
|
||||
self._docs = new LocalCollection._IdMap;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ LocalCollectionDriver = function () {
|
||||
|
||||
var ensureCollection = function (name, collections) {
|
||||
if (!(name in collections))
|
||||
collections[name] = new LocalCollection(name);
|
||||
collections[name] = new LocalCollection({name: name});
|
||||
return collections[name];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user