From 8468406f5daf74a56a4a5606d4910954e794cc66 Mon Sep 17 00:00:00 2001 From: didinele Date: Sun, 24 Jul 2022 15:48:10 +0300 Subject: [PATCH] fix(ShardClientUtil#_respond): construct global error --- packages/discord.js/src/sharding/ShardClientUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/discord.js/src/sharding/ShardClientUtil.js b/packages/discord.js/src/sharding/ShardClientUtil.js index 269d5c6c6ff6..7c5586da29d6 100644 --- a/packages/discord.js/src/sharding/ShardClientUtil.js +++ b/packages/discord.js/src/sharding/ShardClientUtil.js @@ -206,7 +206,7 @@ class ShardClientUtil { */ _respond(type, message) { this.send(message).catch(err => { - const error = new Error(`Error when sending ${type} response to master process: ${err.message}`); + const error = new globalThis.Error(`Error when sending ${type} response to master process: ${err.message}`); error.stack = err.stack; /** * Emitted when the client encounters an error.