From a41a05de317403cdf155bf8df7862aefc8f5c56e Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 25 Oct 2017 20:48:45 +0900 Subject: [PATCH] Fix #89 --- CHANGELOG.md | 8 +++++-- src/web/app/desktop/tags/timeline.tag | 30 +++++++++++++++++---------- src/web/app/desktop/tags/ui.tag | 30 +++++++++++++++------------ src/web/app/mobile/tags/timeline.tag | 30 +++++++++++++++++---------- src/web/app/mobile/tags/ui.tag | 2 +- 5 files changed, 62 insertions(+), 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 675ffe62b..cb68046ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,17 @@ ChangeLog (Release Notes) ========================= 主に notable な changes を書いていきます +unreleased +---------- +* Fix: 非ログイン状態ですべてのページが致命的な問題を発生させる (#89) + 2742 (2017/10/25) ----------------- -* トラブルシューティングを実装するなど +* New: トラブルシューティングを実装するなど 2735 (2017/10/22) ----------------- -* モバイル版からでもクライアントバージョンを確認できるように +* New: モバイル版からでもクライアントバージョンを確認できるように 2732 (2017/10/22) ----------------- diff --git a/src/web/app/desktop/tags/timeline.tag b/src/web/app/desktop/tags/timeline.tag index cd7ac7d20..2d6b439e3 100644 --- a/src/web/app/desktop/tags/timeline.tag +++ b/src/web/app/desktop/tags/timeline.tag @@ -424,6 +424,7 @@ import compile from '../../common/scripts/text-compiler'; import dateStringify from '../../common/scripts/date-stringify'; + this.mixin('i'); this.mixin('api'); this.mixin('stream'); this.mixin('user-preview'); @@ -462,24 +463,31 @@ }; this.capture = withHandler => { - this.stream.send({ - type: 'capture', - id: this.post.id - }); - if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated); + if (this.SIGNIN) { + this.stream.send({ + type: 'capture', + id: this.post.id + }); + if (withHandler) this.stream.on('post-updated', this.onStreamPostUpdated); + } }; this.decapture = withHandler => { - this.stream.send({ - type: 'decapture', - id: this.post.id - }); - if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated); + if (this.SIGNIN) { + this.stream.send({ + type: 'decapture', + id: this.post.id + }); + if (withHandler) this.stream.off('post-updated', this.onStreamPostUpdated); + } }; this.on('mount', () => { this.capture(true); - this.stream.on('_connected_', this.onStreamConnected); + + if (this.SIGNIN) { + this.stream.on('_connected_', this.onStreamConnected); + } if (this.p.text) { const tokens = this.p.ast; diff --git a/src/web/app/desktop/tags/ui.tag b/src/web/app/desktop/tags/ui.tag index fce0743ff..e0d7393b0 100644 --- a/src/web/app/desktop/tags/ui.tag +++ b/src/web/app/desktop/tags/ui.tag @@ -5,7 +5,7 @@
- +