Comparing version 1.4.1 to 1.4.2
@@ -300,3 +300,6 @@ "use strict"; | ||
async _waitForConnection() { | ||
if (this._socket && this._socket.readyState === this._socket.OPEN) { | ||
if (!this._socket || this._socket.readyState === this._socket.CLOSED || this._socket.readyState === this._socket.CLOSING) { | ||
throw new Error("Websocket connection is closed."); | ||
} | ||
if (this._socket.readyState === this._socket.OPEN) { | ||
return this._socket; | ||
@@ -303,0 +306,0 @@ } |
{ | ||
"name": "glazewm", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Library for inter-process communication (IPC) with GlazeWM.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -375,3 +375,11 @@ import { | ||
private async _waitForConnection(): Promise<WebSocket> { | ||
if (this._socket && this._socket.readyState === this._socket.OPEN) { | ||
if ( | ||
!this._socket || | ||
this._socket.readyState === this._socket.CLOSED || | ||
this._socket.readyState === this._socket.CLOSING | ||
) { | ||
throw new Error('Websocket connection is closed.'); | ||
} | ||
if (this._socket.readyState === this._socket.OPEN) { | ||
return this._socket; | ||
@@ -378,0 +386,0 @@ } |
Sorry, the diff of this file is not supported yet
69445
2070