summaryrefslogtreecommitdiff
path: root/src/client/scripts/stream.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-04-04 08:46:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-04-04 08:46:54 +0900
commitd4a630902d8d250b67fcd0ce2b49240786b40368 (patch)
treeb87395691e52e3b86ce40196993d492c694c5e79 /src/client/scripts/stream.ts
parentenhance(server): Log error message when internal error occured (diff)
downloadsharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.gz
sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.bz2
sharkey-d4a630902d8d250b67fcd0ce2b49240786b40368.zip
refactor: Use ===
Diffstat (limited to 'src/client/scripts/stream.ts')
-rw-r--r--src/client/scripts/stream.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/scripts/stream.ts b/src/client/scripts/stream.ts
index 18bb7c13df..4dcd3f1b2e 100644
--- a/src/client/scripts/stream.ts
+++ b/src/client/scripts/stream.ts
@@ -68,7 +68,7 @@ export default class Stream extends EventEmitter {
*/
@autobind
private onOpen() {
- const isReconnect = this.state == 'reconnecting';
+ const isReconnect = this.state === 'reconnecting';
this.state = 'connected';
this.emit('_connected_');
@@ -87,7 +87,7 @@ export default class Stream extends EventEmitter {
*/
@autobind
private onClose() {
- if (this.state == 'connected') {
+ if (this.state === 'connected') {
this.state = 'reconnecting';
this.emit('_disconnected_');
}
@@ -100,7 +100,7 @@ export default class Stream extends EventEmitter {
private onMessage(message) {
const { type, body } = JSON.parse(message.data);
- if (type == 'channel') {
+ if (type === 'channel') {
const id = body.id;
let connections: Connection[];