diff --git a/OHIFViewer/client/routes.js b/OHIFViewer/client/routes.js index a381401da..f8e3b0d0b 100644 --- a/OHIFViewer/client/routes.js +++ b/OHIFViewer/client/routes.js @@ -6,13 +6,13 @@ Router.configure({ }); -// If we are running a disconnect client similar to the StandaloneViewer +// If we are running a disconnected client similar to the StandaloneViewer // (see https://docs.ohif.org/standalone-viewer/usage.html) we don't want // our routes to get stuck while waiting for Pub / Sub. // // In this case, the developer is required to add Servers and specify // a CurrentServer with some other approach (e.g. a separate script). -if (Meteor.status().connected === true) { +if (Meteor.settings.public && Meteor.settings.public.clientOnly !== true) { Router.waitOn(function() { return [ Meteor.subscribe('servers'), diff --git a/Packages/ohif-hanging-protocols/client/protocolStore/defaultStrategy.js b/Packages/ohif-hanging-protocols/client/protocolStore/defaultStrategy.js index 761ae183b..c3684af7b 100644 --- a/Packages/ohif-hanging-protocols/client/protocolStore/defaultStrategy.js +++ b/Packages/ohif-hanging-protocols/client/protocolStore/defaultStrategy.js @@ -303,9 +303,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.status().connected === true) { - HP.ProtocolStore.setStrategy(defaultStrategy); -} else { +if (Meteor.settings.public && Meteor.settings.public.clientOnly === true) { HP.ProtocolStore.setStrategy(clientOnlyStrategy); +} else { + HP.ProtocolStore.setStrategy(defaultStrategy); }