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

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

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 2e4585e..a46a707 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 796e6d1..2ecd413 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));
     });

GitHub sha: 52f8eecb

This commit appears in #10202 which was merged by markvanlan.