Try 2 to fix missing variable in WeKan fails to get MongoDB server version.

Thanks to simon816 and xet7 !

Fixes #4596
pull/4624/head
Lauri Ojansivu 3 years ago
parent 08e18200c6
commit 37f9de8b9b
  1. 13
      server/statistics.js

@ -86,14 +86,11 @@ if (Meteor.isServer) {
mongoOplogEnabled = oplogEnabled;
} catch (e) {
try {
if (mongo === undefined) {
mongoVersion = 'unknown';
} else {
const { version } = Promise.await(
mongo.db.command({ buildinfo: 1 }),
);
mongoVersion = version;
}
const { mongo } = MongoInternals.defaultRemoteCollectionDriver();
const { version } = Promise.await(
mongo.db.command({ buildinfo: 1 }),
);
mongoVersion = version;
mongoStorageEngine = 'unknown';
} catch (e) {
mongoVersion = 'unknown';

Loading…
Cancel
Save