Use correct error key

This commit is contained in:
Chi Vinh Le
2017-05-16 01:09:33 +07:00
parent def35f0a93
commit 74e1436ae4
@@ -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 {