Skip to content

A platform for community discussion. Free, open, simple.

FIX: Incorrect fix for invites breaking when no group is selected (#10202)

Mark VanLandingham52f8eecbb966
diff --git a/app/assets/javascripts/discourse/app/components/invite-link-panel.js b/app/assets/javascripts/discourse/app/components/invite-link-panel.js
index 2e4585e3597..a46a7074c7d 100644
--- a/app/assets/javascripts/discourse/app/components/invite-link-panel.js
+++ b/app/assets/javascripts/discourse/app/components/invite-link-panel.js
@@ -14,12 +14,13 @@ export default Component.extend({
inviteExpiresAt: moment()
.add(1, "month")
.format("YYYY-MM-DD"),
- groupIds: [],
+ groupIds: null,
allGroups: null,
init() {
this._super(...arguments);
+ this.set("groupIds", []);
Group.findAll().then(groups => {
this.set("allGroups", groups.filterBy("automatic", false));
});
diff --git a/app/assets/javascripts/discourse/app/components/invite-panel.js b/app/assets/javascripts/discourse/app/components/invite-panel.js
index 796e6d128c9..2ecd4131603 100644
--- a/app/assets/javascripts/discourse/app/components/invite-panel.js
+++ b/app/assets/javascripts/discourse/app/components/invite-panel.js
@@ -12,7 +12,7 @@ import { getNativeContact } from "discourse/lib/pwa-utils";
export default Component.extend({
tagName: null,
- groupIds: [],
+ groupIds: null,
allGroups: null,
inviteModel: alias("panel.model.inviteModel"),
@@ -31,6 +31,7 @@ export default Component.extend({
init() {
this._super(...arguments);
+ this.set("groupIds", []);
Group.findAll().then(groups => {
this.set("allGroups", groups.filterBy("automatic", false));
});