Handle missing section

This commit is contained in:
Bryan Ashby 2020-07-07 19:41:17 -06:00
parent 848d1f02b0
commit c565b8caec
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
1 changed files with 4 additions and 0 deletions

View File

@ -265,6 +265,10 @@ exports.ThemeManager = class ThemeManager {
};
[ 'menus', 'prompts'].forEach(sectionName => {
if (!_.isObject(mergedTheme.sectionName)) {
return Log.error({sectionName}, 'Merged theme is missing section');
}
Object.keys(mergedTheme[sectionName]).forEach(entryName => {
let createdFormSection = false;
const mergedThemeMenu = mergedTheme[sectionName][entryName];