fix(client-only): Fix client-only Server & CurrentServer usage (#276)

This commit is contained in:
Erik Ziegler authored and GitHub committed 2018-09-21 20:02:29 +02:00
1 parent c4b1086097
commit 18a3bcba30
10 files changed
+86 -37

No files matched your search

@@ -2,7 +2,12 @@ import { Mongo } from 'meteor/mongo';
import { OHIF } from 'meteor/ohif:core';
// CurrentServer is a single document collection to describe which of the Servers is being used
const CurrentServer = new Mongo.Collection('currentServer');
let collectionName = 'currentServer';
if (Meteor.settings && Meteor.settings.public && Meteor.settings.public.clientOnly === true) {
collectionName = null;
}
const CurrentServer = new Mongo.Collection(collectionName);
CurrentServer._debugName = 'CurrentServer';
OHIF.servers.collections.currentServer = CurrentServer;