Prevent transition abortion on contributor save

This commit is contained in:
2019-09-18 09:32:57 +02:00
parent 985e1673ac
commit f272bcfcbc
3 changed files with 4 additions and 6 deletions
@@ -8,6 +8,7 @@ import { isAddress } from 'web3-utils';
export default Component.extend({
kredits: service(),
router: service(),
attributes: null,
@@ -75,6 +76,7 @@ export default Component.extend({
window.alert('Something went wrong. Please check the browser console.');
}).finally(() => {
this.set('inProgress', false);
this.router.transitionTo('dashboard');
});
}
+1 -3
View File
@@ -8,9 +8,7 @@ export default Controller.extend({
actions: {
save (attributes) {
return this.kredits
.updateContributor(this.model.id, attributes)
.then(() => this.transitionToRoute('index'))
return this.kredits.updateContributor(this.model.id, attributes);
}
}
+1 -3
View File
@@ -8,9 +8,7 @@ export default Controller.extend({
actions: {
save (contributor) {
return this.kredits
.addContributor(contributor)
.then(() => this.transitionToRoute('index'))
return this.kredits.addContributor(contributor);
}
}