From 51fa0d92920516e1194496b3c471c720722b0e67 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 13 Nov 2020 21:01:48 +0100 Subject: [PATCH] Update NotificationSounds.plugin.js --- Plugins/NotificationSounds/NotificationSounds.plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/NotificationSounds/NotificationSounds.plugin.js b/Plugins/NotificationSounds/NotificationSounds.plugin.js index 3154acb339..8f2ffcd8d9 100644 --- a/Plugins/NotificationSounds/NotificationSounds.plugin.js +++ b/Plugins/NotificationSounds/NotificationSounds.plugin.js @@ -267,7 +267,8 @@ module.exports = (_ => { BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SoundUtils, "playSound", {instead: e => { let type = e.methodArguments[0]; - if (choices[type]) BDFDB.TimeUtils.timeout(_ => { + if (!type) return; + else if (choices[type]) BDFDB.TimeUtils.timeout(_ => { e.stopOriginalMethodCall(); if (type == "message1") { if (firedEvents["dm"]) firedEvents["dm"] = false;