From 2199ac679423b04cbd15c5f40bc9be86c061d58c Mon Sep 17 00:00:00 2001 From: WlanKabL <55993320+WlanKabL@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:47:50 +0200 Subject: [PATCH] Bugfix isConnected crash --- rustplus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rustplus.js b/rustplus.js index 4497096..aa6e95b 100644 --- a/rustplus.js +++ b/rustplus.js @@ -125,7 +125,7 @@ class RustPlus extends EventEmitter { * @returns {boolean} */ isConnected() { - return (this.websocket.readyState === WebSocket.OPEN); + return (this.websocket && this.websocket.readyState === WebSocket.OPEN); } /**