Explorar el Código

Merge branch 'Akuket-devel' into devel

Lauri Ojansivu hace 7 años
padre
commit
1a7796f2ca
Se han modificado 2 ficheros con 17 adiciones y 6 borrados
  1. 5 1
      CHANGELOG.md
  2. 12 5
      client/components/settings/invitationCode.js

+ 5 - 1
CHANGELOG.md

@@ -13,7 +13,11 @@ and fixes the following mobile bugs:
 - [Hotfix more sortable elements](https://github.com/wekan/wekan/commit/616dade81c25b10fc409aee1bcc9a93ddbfee81b);
 - [Hotfix for mobile device](https://github.com/wekan/wekan/commit/43d86d7d5d3f3b34b0500f6d5d3afe7bd86b0060).
 
-Thanks to GitHub users adyachok, halunk3, Haocen and xet7 for their contributions.
+and fixes the following bugs:
+
+- [Fix invitation code](https://github.com/wekan/wekan/pull/1777).
+
+Thanks to GitHub users adyachok, Akuket, halunk3, Haocen and xet7 for their contributions.
 
 # v1.18 2018-07-06 Wekan release
 

+ 12 - 5
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() {
+      const setting = Settings.findOne();
+
+      if (!setting || !setting.disableRegistration) {
+        $('#invitationcode').hide();
+      }
+
+      return this.stop();
+    },
+  });
 });