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
|
// Part of Replies fallback support
|
||||||
static stripPlainReply(body) {
|
static stripPlainReply(body) {
|
||||||
const lines = body.split('\n');
|
const lines = body.split('\n');
|
||||||
while (lines[0].startsWith('> ')) lines.shift();
|
while (lines.length && lines[0].startsWith('> ')) lines.shift();
|
||||||
return lines.join('\n');
|
return lines.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user