You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
fix access of element [0] of array even though it sometimes does not exist
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@ -142,7 +142,7 @@ export default class ReplyThread extends React.Component {
|
||||
// Part of Replies fallback support
|
||||
static stripPlainReply(body) {
|
||||
const lines = body.split('\n');
|
||||
while (lines[0].startsWith('> ')) lines.shift();
|
||||
while (lines.length && lines[0].startsWith('> ')) lines.shift();
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user