Fix: type error trim of undefined#2595 (#2702)
This commit is contained in:
parent
d7da6fbfb5
commit
359c3c8ccb
1 changed files with 7 additions and 1 deletions
|
@ -169,7 +169,7 @@ export default {
|
||||||
return this.maxLength - this.message.length;
|
return this.maxLength - this.message.length;
|
||||||
},
|
},
|
||||||
isReplyButtonDisabled() {
|
isReplyButtonDisabled() {
|
||||||
const isMessageEmpty = !this.message.trim().replace(/\n/g, '').length;
|
const isMessageEmpty = this.isMessageEmpty;
|
||||||
|
|
||||||
if (this.hasAttachments) return false;
|
if (this.hasAttachments) return false;
|
||||||
return (
|
return (
|
||||||
|
@ -235,6 +235,12 @@ export default {
|
||||||
isOnPrivateNote() {
|
isOnPrivateNote() {
|
||||||
return this.replyType === REPLY_EDITOR_MODES.NOTE;
|
return this.replyType === REPLY_EDITOR_MODES.NOTE;
|
||||||
},
|
},
|
||||||
|
isMessageEmpty() {
|
||||||
|
if(!this.message) {
|
||||||
|
this.message = '';
|
||||||
|
}
|
||||||
|
return !this.message.trim().replace(/\n/g, '').length;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentChat(conversation) {
|
currentChat(conversation) {
|
||||||
|
|
Loading…
Reference in a new issue