From 0373d81199653fc2fedfe7b3ed9422c106668ded Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Wed, 14 Feb 2018 18:51:51 +0000 Subject: [PATCH] Fixed showing content manager error modal with no errors --- client/src/ui/modals.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/ui/modals.js b/client/src/ui/modals.js index a29c1408..11afc72f 100644 --- a/client/src/ui/modals.js +++ b/client/src/ui/modals.js @@ -74,7 +74,8 @@ export default class { static showContentManagerErrors() { // Get any errors from PluginManager and ThemeManager - this.error({ + const errors = ([]).concat(PluginManager.errors).concat(ThemeManager.errors); + if (errors.length) return this.error({ header: (PluginManager.errors.length && ThemeManager.errors.length ? '' : (PluginManager.errors.length ? PluginManager.moduleName : ThemeManager.moduleName) + ' - ') + @@ -85,7 +86,7 @@ export default class { module: (PluginManager.errors.length && ThemeManager.errors.length ? 'Content Manager' : (PluginManager.errors.length ? PluginManager.moduleName : ThemeManager.moduleName)), type: 'err', - content: ([]).concat(PluginManager.errors).concat(ThemeManager.errors) + content: errors }); }