Add null-check
This commit is contained in:
parent
49f9783158
commit
451202f21f
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ export default {
|
|||
while (lines.length && !lines[0].startsWith('> ')) lines.shift();
|
||||
// Reply fallback has a blank line after it, so remove it to prevent leading newline
|
||||
if (lines[0] === '') lines.shift();
|
||||
const text = lines[0].replace(/^> (<.*> )?/g, '');
|
||||
const text = lines[0] && lines[0].replace(/^> (<.*> )?/g, '');
|
||||
if (text) {
|
||||
return text;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue