Fix: Mongo.setConnectionOptions was not being set correctly (#13586)

pull/11745/head^2
Rodrigo Nascimento 6 years ago committed by Diego Sampaio
parent f04fbf7adb
commit b16fe93334
  1. 2
      .meteor/packages
  2. 12
      packages/rocketchat-mongo-config/server/index.js

@ -3,8 +3,8 @@
# 'meteor add' and 'meteor remove' will edit this file for you, # 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand. # but you can also edit it by hand.
rocketchat:cors
rocketchat:mongo-config rocketchat:mongo-config
rocketchat:cors
accounts-facebook@1.3.2 accounts-facebook@1.3.2
accounts-github@1.4.2 accounts-github@1.4.2

@ -1,16 +1,8 @@
import { Mongo } from 'meteor/mongo'; import { Mongo } from 'meteor/mongo';
// Revert change from Meteor 1.6.1 who set ignoreUndefined: true
// more information https://github.com/meteor/meteor/pull/9444
let mongoOptions = {
ignoreUndefined: false,
};
const mongoOptionStr = process.env.MONGO_OPTIONS; const mongoOptionStr = process.env.MONGO_OPTIONS;
if (typeof mongoOptionStr !== 'undefined') { if (typeof mongoOptionStr !== 'undefined') {
const jsonMongoOptions = JSON.parse(mongoOptionStr); const mongoOptions = JSON.parse(mongoOptionStr);
mongoOptions = Object.assign({}, mongoOptions, jsonMongoOptions); Mongo.setConnectionOptions(mongoOptions);
} }
Mongo.setConnectionOptions(mongoOptions);

Loading…
Cancel
Save