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

This commit is contained in:
Mark VanLandingham 2020-07-09 11:58:29 -05:00 committed by GitHub
parent 9d74cf6a63
commit 52f8eecbb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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));
});

View File

@ -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));
});