Meteor-Community-Packages / mongo-collection-instances

🗂 Meteor package allowing Mongo Collection instance lookup by collection name
http://packosphere.com/dburles/mongo-collection-instances
MIT License
73 stars 27 forks source link

Error on collections with a null connection #22

Open BudgieInWA opened 9 years ago

BudgieInWA commented 9 years ago

Reproduce

new Mongo.Collection('mycollection', {connection: null});
Mongo.Collection.get('mycollection', {connection: "dummy val"}); // It only matters that connection is included.

Result

Uncaught TypeError: Cannot read property '_lastSessionId' of null

at line 16. That is, instance.options.connection is null.

dburles commented 9 years ago

Thanks @BudgieInWA . I'll work on a fix shortly.