diff --git a/src/component/internal/connection.ts b/src/component/internal/connection.ts index 977e71c2..fc1340dd 100644 --- a/src/component/internal/connection.ts +++ b/src/component/internal/connection.ts @@ -44,7 +44,7 @@ export class NekoConnection extends EventEmitter { } }) this.websocket.on('disconnected', () => { - if (this._state.status !== 'disconnected') { + if (this._state.status === 'connected') { Vue.set(this._state, 'status', 'disconnected') } @@ -63,7 +63,7 @@ export class NekoConnection extends EventEmitter { } }) this.webrtc.on('disconnected', () => { - if (this._state.status !== 'disconnected') { + if (this._state.status === 'connected') { Vue.set(this._state, 'status', 'disconnected') }