From bda84d8d8023769e1ac4ce284e470d41cb52a3bb Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Wed, 21 Jul 2021 18:59:02 +0400 Subject: [PATCH] Return promise from join.then() --- app/assets/javascripts/discourse/app/models/group.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/app/models/group.js b/app/assets/javascripts/discourse/app/models/group.js index 6ce97c898c9..cc6cbbf01b8 100644 --- a/app/assets/javascripts/discourse/app/models/group.js +++ b/app/assets/javascripts/discourse/app/models/group.js @@ -130,9 +130,7 @@ const Group = RestModel.extend({ join() { return ajax(`/groups/${this.id}/join.json`, { type: "PUT", - }).then(() => { - this.findMembers(); - }); + }).then(() => this.findMembers()); }, addOwners(usernames, filter, notifyUsers) {