don't process empty sets

This commit is contained in:
Amish Shah
2017-01-07 22:09:51 +00:00
parent de0ba9fb7c
commit 9f8289e433

View File

@@ -327,6 +327,7 @@ class VoiceBroadcast extends EventEmitter {
buffer = this.applyVolume(buffer);
for (const x of this._dispatchers.entries()) {
if (x[1].size === 0) continue;
const [volume, container] = x;
const opusPacket = this.opusEncoder.encode(this.applyVolume(buffer, volume));
for (const dispatcher of container.values()) {