From 0318f7344fae3265171682a016f90368e3d2a8c3 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 12 Jun 2018 19:05:40 +0900 Subject: [PATCH] Fix bug --- src/client/app/common/views/components/note-html.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/app/common/views/components/note-html.ts b/src/client/app/common/views/components/note-html.ts index 4941ee978..8fa5f380d 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(); }