Reloading page if last selected project was deleted

This commit is contained in:
loganhz 2017-11-27 21:35:47 +08:00
parent c53c0f91d9
commit 9ca44910e6
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ var Project = Resource.extend(PolledResource, {
var promise = this._super.apply(this, arguments);
return promise.then(() => {
this.set('state', 'removed');
if (this.get('active')) {
window.location.href = window.location.href;
}
}).catch((err) => {
this.get('growl').fromError('Error deleting', err);
});