Fixed showing content manager error modal with no errors

This commit is contained in:
Samuel Elliott 2018-02-14 18:51:51 +00:00
parent a9d488b748
commit 0373d81199
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 3 additions and 2 deletions

View File

@ -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
});
}