[FIX] Error when acessing settings before ready

pull/7622/head
Rodrigo Nascimento 8 years ago
parent 02fa343f11
commit 72df873f48
  1. 3
      packages/rocketchat-ui-master/client/main.js

@ -129,7 +129,8 @@ Template.main.helpers({
subsReady() {
const routerReady = FlowRouter.subsReady('userData', 'activeUsers');
const subscriptionsReady = CachedChatSubscription.ready.get();
const ready = (Meteor.userId() == null) || (routerReady && subscriptionsReady);
const settingsReady = RocketChat.settings.cachedCollection.ready.get();
const ready = (Meteor.userId() == null) || (routerReady && subscriptionsReady && settingsReady);
RocketChat.CachedCollectionManager.syncEnabled = ready;
return ready;
},

Loading…
Cancel
Save