Skip to content

Commit

Permalink
Merge pull request #7622 from RocketChat/hotfix/acessing-settings-bef…
Browse files Browse the repository at this point in the history
…ore-ready

[FIX] Error when acessing settings before ready
  • Loading branch information
rodrigok committed Aug 1, 2017
2 parents dd77b12 + 72df873 commit e461bdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/rocketchat-ui-master/client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},
Expand Down

0 comments on commit e461bdb

Please sign in to comment.