From a6adc0e41f7096061aa354f5f89c39845e6b6807 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Tue, 3 Nov 2020 22:10:34 +0100 Subject: [PATCH] :bug: Add return before emit --- src/Player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Player.js b/src/Player.js index f06c56d..cc61715 100644 --- a/src/Player.js +++ b/src/Player.js @@ -171,7 +171,7 @@ class Player extends EventEmitter { }).catch(() => {}) } - if (tracks.length === 0) this.emit('noResults', message, query) + if (tracks.length === 0) return this.emit('noResults', message, query) this.emit('searchResults', message, query, tracks)