3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-19 08:05: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 35fa696eb4
commit b4ef037871

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;