diff options
author | Akuket <32392661+Akuket@users.noreply.github.com> | 2018-07-16 12:51:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 12:51:18 +0200 |
commit | 980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4 (patch) | |
tree | 46c187c49713349a17cbe5405c9142b9b1dd5b27 | |
parent | 0dd82fedafa4cef98167bfd88917ec34624ae487 (diff) | |
download | wekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.tar.gz wekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.tar.bz2 wekan-980fd4f61e0fb8086e1ffc9bc5e73c294b5febe4.zip |
Patch Invitation Code
-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(); + } + }); }); |