fix access of element [0] of array even though it sometimes does not exist

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2018-03-06 15:17:57 +00:00
parent 3b02766be9
commit ed8f087eb6
No known key found for this signature in database
GPG Key ID: 3F879DA5AD802A5E
1 changed files with 1 additions and 1 deletions

View File

@ -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');
} }