fix: sentry issues [CW-2222][CW-2232] (#7591)

This commit is contained in:
Shivam Mishra
2023-07-26 23:37:37 +05:30
committed by GitHub
parent 846f520ad2
commit 12c338364e
2 changed files with 15 additions and 6 deletions

View File

@@ -49,13 +49,20 @@ export default {
},
},
mounted() {
this.$nextTick(() => {
const wrap = this.$refs.messageContainer;
const message = wrap.querySelector('.message-content');
this.isOverflowing = message.offsetHeight > 150;
});
this.$watch(() => {
return this.$refs.messageContainer;
}, this.setOverflow);
this.$nextTick(this.setOverflow);
},
methods: {
setOverflow() {
const wrap = this.$refs.messageContainer;
if (wrap) {
const message = wrap.querySelector('.message-content');
this.isOverflowing = message.offsetHeight > 150;
}
},
escapeHtml(html) {
var text = document.createTextNode(html);
var p = document.createElement('p');

View File

@@ -242,7 +242,9 @@ export default {
get() {
const inboxList = this.contact.contactableInboxes || [];
return (
inboxList.find(inbox => inbox.inbox.id === this.targetInbox.id) || {
inboxList.find(inbox => {
return inbox.inbox?.id && inbox.inbox?.id === this.targetInbox?.id;
}) || {
inbox: {},
}
);