diff --git a/src/client/app/common/views/components/note-html.ts b/src/client/app/common/views/components/note-html.ts index 4941ee9783..8fa5f380dd 100644 --- a/src/client/app/common/views/components/note-html.ts +++ b/src/client/app/common/views/components/note-html.ts @@ -44,10 +44,10 @@ export default Vue.component('mk-note-html', { return; } - while ( + while (ast[ast.length - 1] && ( ast[ast.length - 1].type == 'hashtag' || (ast[ast.length - 1].type == 'text' && ast[ast.length - 1].content == ' ') || - (ast[ast.length - 1].type == 'text' && ast[ast.length - 1].content == '\n')) { + (ast[ast.length - 1].type == 'text' && ast[ast.length - 1].content == '\n'))) { ast.pop(); }