Fixed member deletion UI getting stuck in certain cases

no issues
refs https://github.com/emberjs/ember.js/issues/5566#issuecomment-429389165

Member deletion UI gets stuck in UI when deleted via these steps: View member list, filtered by label. Click on a member, delete them. Admin transitions back to previous screen before action is completed — deletion completes successfully but deletion UI hangs.

This happens due to a niche ember bug which causes transitions to abort when transitioning to a route with query params having `refreshModel:true`. The fix is simple one liner with return being separated from the route transition statement.
This commit is contained in:
Rishabh 2021-08-30 13:10:46 +05:30
parent 107ed0e1f3
commit 3cd092f5fe

View File

@ -78,7 +78,8 @@ export default class MemberController extends Controller {
};
return this.member.destroyRecord(options).then(() => {
this.members.refreshData();
return this.transitionToRoute('members');
this.transitionToRoute('members');
return;
}, (error) => {
return this.notifications.showAPIError(error, {key: 'member.delete'});
});