3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00

automod: fix possible error in config preprocessor

This commit is contained in:
Dragory 2020-07-30 13:28:46 +03:00
parent 94bc60268c
commit 8082752cba
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -79,7 +79,10 @@ const configPreprocessor: ConfigPreprocessorFn<AutomodPluginType> = 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;