If we are opening a local minimongo collection, and are not defined as the client, then the server can be null, but we should still be able to connect to a local minimongo db.There are not any cases where the conenction is null, where we would want to proceed.

This commit is contained in:
ekatek
2014-02-28 14:49:25 -08:00
parent d50049777f
commit 94f5efc893

View File

@@ -57,7 +57,8 @@ Meteor.Collection = function (name, options) {
self._connection = Meteor.server;
if (!options._driver) {
if (name && self._connection === Meteor.server &&
if (name && (self._connection !== null) &&
self._connection === Meteor.server &&
typeof MongoInternals !== "undefined" &&
MongoInternals.defaultRemoteCollectionDriver) {
options._driver = MongoInternals.defaultRemoteCollectionDriver();