mirror of
https://github.com/discourse/discourse.git
synced 2025-03-23 21:36:09 +08:00
FIX: exceptions raised when editing replies were not displaying their error messages
This commit is contained in:
parent
8893ca6238
commit
dbcf4e2474
@ -762,15 +762,10 @@ const Composer = RestModel.extend({
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
// rest model only sets props after it is saved
|
// rest model only sets props after it is saved
|
||||||
post.set("cooked", props.cooked);
|
post.set("cooked", props.cooked);
|
||||||
return post
|
return post.save(props).then(result => {
|
||||||
.save(props)
|
this.clearState();
|
||||||
.then(result => {
|
return result;
|
||||||
this.clearState();
|
});
|
||||||
return result;
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
throw new Error(error);
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
.catch(rollback);
|
.catch(rollback);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user