mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 10:12:34 +00:00
Fix: type error trim of undefined#2595 (#2702)
This commit is contained in:
@@ -169,7 +169,7 @@ export default {
|
||||
return this.maxLength - this.message.length;
|
||||
},
|
||||
isReplyButtonDisabled() {
|
||||
const isMessageEmpty = !this.message.trim().replace(/\n/g, '').length;
|
||||
const isMessageEmpty = this.isMessageEmpty;
|
||||
|
||||
if (this.hasAttachments) return false;
|
||||
return (
|
||||
@@ -235,6 +235,12 @@ export default {
|
||||
isOnPrivateNote() {
|
||||
return this.replyType === REPLY_EDITOR_MODES.NOTE;
|
||||
},
|
||||
isMessageEmpty() {
|
||||
if(!this.message) {
|
||||
this.message = '';
|
||||
}
|
||||
return !this.message.trim().replace(/\n/g, '').length;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentChat(conversation) {
|
||||
|
||||
Reference in New Issue
Block a user