From c565b8caecbcb3039517d932c17caea3cf34878a Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 7 Jul 2020 19:41:17 -0600 Subject: [PATCH] Handle missing section --- core/theme.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/theme.js b/core/theme.js index f763614d..c64792d5 100644 --- a/core/theme.js +++ b/core/theme.js @@ -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];