From 8082752cba55a2316ae4e30f635070465feee103 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Thu, 30 Jul 2020 13:28:46 +0300 Subject: [PATCH] automod: fix possible error in config preprocessor --- backend/src/plugins/Automod/AutomodPlugin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/plugins/Automod/AutomodPlugin.ts b/backend/src/plugins/Automod/AutomodPlugin.ts index 6f6f8279..d1769d45 100644 --- a/backend/src/plugins/Automod/AutomodPlugin.ts +++ b/backend/src/plugins/Automod/AutomodPlugin.ts @@ -79,7 +79,10 @@ const configPreprocessor: ConfigPreprocessorFn = options => { } const triggerBlueprint = availableTriggers[triggerName]; - triggerObj[triggerName] = configUtils.mergeConfig(triggerBlueprint.defaultConfig, triggerObj[triggerName]); + triggerObj[triggerName] = configUtils.mergeConfig( + triggerBlueprint.defaultConfig, + triggerObj[triggerName] || {}, + ); if (triggerObj[triggerName].match_attachment_type) { const white = triggerObj[triggerName].match_attachment_type.whitelist_enabled;