mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
Use correct error key
This commit is contained in:
@@ -65,7 +65,7 @@ export class EditableCommentContent extends React.Component {
|
||||
componentWillUnmount() {
|
||||
if (this.editWindowExpiryTimeout) {
|
||||
this.editWindowExpiryTimeout = clearTimeout(this.editWindowExpiryTimeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
async editComment(edit) {
|
||||
const {editComment, addNotification, stopEditing} = this.props;
|
||||
@@ -83,7 +83,7 @@ export class EditableCommentContent extends React.Component {
|
||||
successfullyEdited = true;
|
||||
} catch (error) {
|
||||
if (error.translation_key) {
|
||||
addNotification('error', lang.t(error.translation_key) || error.translation_key);
|
||||
addNotification('error', lang.t(`error.${error.translation_key}`));
|
||||
} else if (error.networkError) {
|
||||
addNotification('error', lang.t('error.networkError'));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user