From 4cbbaf3f77cd6c87d822c0cbcaad58e4a42490ac Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 23 Feb 2018 04:07:22 +0900 Subject: :v: --- src/web/app/desktop/views/components/posts.post.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/web/app/desktop') diff --git a/src/web/app/desktop/views/components/posts.post.vue b/src/web/app/desktop/views/components/posts.post.vue index 6fe097909b..a05a498110 100644 --- a/src/web/app/desktop/views/components/posts.post.vue +++ b/src/web/app/desktop/views/components/posts.post.vue @@ -142,8 +142,10 @@ export default Vue.extend({ } }, created() { - this.connection = (this as any).os.stream.getConnection(); - this.connectionId = (this as any).os.stream.use(); + if ((this as any).os.isSignedIn) { + this.connection = (this as any).os.stream.getConnection(); + this.connectionId = (this as any).os.stream.use(); + } }, mounted() { this.capture(true); @@ -154,8 +156,11 @@ export default Vue.extend({ }, beforeDestroy() { this.decapture(true); - this.connection.off('_connected_', this.onStreamConnected); - (this as any).os.stream.dispose(this.connectionId); + + if ((this as any).os.isSignedIn) { + this.connection.off('_connected_', this.onStreamConnected); + (this as any).os.stream.dispose(this.connectionId); + } }, methods: { capture(withHandler = false) { -- cgit v1.2.3-freya