refactor: Use ===

This commit is contained in:
syuilo
2020-04-04 08:46:54 +09:00
parent fef5ec874b
commit d4a630902d
39 changed files with 69 additions and 69 deletions

View File

@@ -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[];