fix(client-only): Fix client-only Server & CurrentServer usage (#276)
This commit is contained in:
1 parent
c4b1086097
commit
18a3bcba30
10 files changed
+86
-37
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { Meteor } from "meteor/meteor";
|
||||
// The ProtocolStore default strategy is used to persist hanging protocols in
|
||||
// the MongoDB collection 'HangingProtocols' in the application server.
|
||||
|
||||
@@ -9,11 +10,6 @@ var defaultStrategy = (function () {
|
||||
console.log('Inserting default protocols');
|
||||
|
||||
addProtocol(HP.defaultProtocol);
|
||||
|
||||
//addProtocol(HP.testProtocol);
|
||||
/* HP.demoProtocols.forEach(protocol => {
|
||||
addProtocol(protocol);
|
||||
});*/
|
||||
}
|
||||
|
||||
function getDatabaseIdByProtocolId(protocolId) {
|
||||
@@ -303,7 +299,9 @@ var clientOnlyStrategy = (function () {
|
||||
// If we are running a disconnect client similar to the StandaloneViewer
|
||||
// (see https://docs.ohif.org/standalone-viewer/usage.html) we don't want
|
||||
// our HangingProtocol strategy to try to use Meteor methods or Pub / Sub
|
||||
if (Meteor.settings.public && Meteor.settings.public.clientOnly === true) {
|
||||
if (Meteor.settings &&
|
||||
Meteor.settings.public &&
|
||||
Meteor.settings.public.clientOnly === true) {
|
||||
HP.ProtocolStore.setStrategy(clientOnlyStrategy);
|
||||
} else {
|
||||
HP.ProtocolStore.setStrategy(defaultStrategy);
|
||||
|
||||
Reference in new issue
Block a user