diff options
Diffstat (limited to 'client/components/settings')
-rw-r--r-- | client/components/settings/invitationCode.js | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/client/components/settings/invitationCode.js b/client/components/settings/invitationCode.js index a403d8ab..ce2e9a5b 100644 --- a/client/components/settings/invitationCode.js +++ b/client/components/settings/invitationCode.js @@ -1,6 +1,13 @@ -Template.invitationCode.onRendered(() => { - const setting = Settings.findOne(); - if (!setting || !setting.disableRegistration) { - $('#invitationcode').hide(); - } +Template.invitationCode.onRendered(function() { + Meteor.subscribe('setting', { + onReady : function() { + const setting = Settings.findOne(); + + if (!setting || !setting.disableRegistration) { + $('#invitationcode').hide(); + } + + return this.stop(); + } + }); }); |