mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
src: Replace instanceof Array checks with Array.isArray and instanceof Buffer with Buffer.isBuffer (#3227)
* src: Replace instanceof Array checks with Array.isArray * src: Buffer.isBuffer instead of instanceof Buffer
This commit is contained in:
@@ -160,8 +160,9 @@ class WebSocketManager extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.client.options.shards instanceof Array) {
|
||||
const { shards } = this.client.options;
|
||||
const { shards } = this.client.options;
|
||||
|
||||
if (Array.isArray(shards)) {
|
||||
this.totalShards = shards.length;
|
||||
this.debug(`Spawning shards: ${shards.join(', ')}`);
|
||||
this.shardQueue = new Set(shards.map(id => new WebSocketShard(this, id)));
|
||||
|
||||
Reference in New Issue
Block a user