Skip to content

Commit

Permalink
Check text exists before accessing it (#4395)
Browse files Browse the repository at this point in the history
* Check text exists before accessing it

resolves #4337
  • Loading branch information
nicodh authored Dec 8, 2024
1 parent f507eee commit d0b1ddd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

## Fixed
- handle double escape on Dialog #4365
- fix random crashes on quote reply #4337

<a id="1_49_0"></a>

Expand Down
21 changes: 12 additions & 9 deletions packages/frontend/src/components/message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -792,15 +792,18 @@ export const Quote = ({
)}
</>
)}
<div className='quoted-text'>
<MessageBody
text={
quote.text.slice(0, 3000 /* limit quoted message size */) || ''
}
disableJumbomoji
nonInteractiveContent
/>
</div>
{quote.text && (
<div className='quoted-text'>
<MessageBody
text={
quote.text.slice(0, 3000 /* limit quoted message size */) ||
''
}
disableJumbomoji
nonInteractiveContent
/>
</div>
)}
</div>
{hasMessage && quote.image && (
<img
Expand Down

0 comments on commit d0b1ddd

Please sign in to comment.