From ff7ae427fd49beaf57bc196ccd8b6bd3fa054e33 Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Thu, 6 Feb 2020 22:18:23 +0900
Subject: Resolve #5860

---
 src/client/components/note.vue | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/client/components/note.vue')

diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index 7600a40582..ebec56560a 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -275,8 +275,14 @@ export default Vue.extend({
 	methods: {
 		capture(withHandler = false) {
 			if (this.$store.getters.isSignedIn) {
-				this.connection.send('sn', { id: this.appearNote.id });
-				if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
+				if (document.body.contains(this.$el)) {
+					this.connection.send('sn', { id: this.appearNote.id });
+					if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
+				} else {
+					this.$once('hook:activated', () => {
+						this.capture(withHandler);
+					});
+				}
 			}
 		},
 
-- 
cgit v1.2.3-freya

