diff --git a/client/src/modules/contentmanager.js b/client/src/modules/contentmanager.js index 735fd19b..5ffbd30f 100644 --- a/client/src/modules/contentmanager.js +++ b/client/src/modules/contentmanager.js @@ -122,7 +122,7 @@ export default class { } catch (err) { this.errors.push(new ErrorEvent({ module: this.moduleName, - message: `Failed to unload ${dir}`, + message: `Failed to unload ${content.dirName}`, err })); @@ -295,10 +295,10 @@ export default class { static findContent(wild, nonunique) { if (this.isThisContent(wild)) return wild; let content; - if (content = this.getContentById(wild)) return content; - if (content = this.getContentByDirName(wild)) return content; - if (content = this.getContentByPath(wild)) return content; - if (content = nonunique && this.getContentByName(wild)) return content; + content = this.getContentById(wild); if (content) return content; + content = this.getContentByDirName(wild); if (content) return content; + content = this.getContentByPath(wild); if (content) return content; + content = this.getContentByName(wild); if (content && nonunique) return content; } static getContentIndex(content) { return this.localContent.findIndex(c => c === content) } diff --git a/client/src/modules/plugin.js b/client/src/modules/plugin.js index 14f85de3..1ae51846 100644 --- a/client/src/modules/plugin.js +++ b/client/src/modules/plugin.js @@ -11,6 +11,7 @@ import { Utils, FileUtils } from 'common'; import { Modals } from 'ui'; import { EventEmitter } from 'events'; +import PluginManager from './pluginmanager'; import ContentConfig from './contentconfig'; import { SettingUpdatedEvent, SettingsUpdatedEvent } from 'structs'; diff --git a/client/src/modules/thememanager.js b/client/src/modules/thememanager.js index ada6a968..0b1ac0e9 100644 --- a/client/src/modules/thememanager.js +++ b/client/src/modules/thememanager.js @@ -53,7 +53,10 @@ export default class ThemeManager extends ContentManager { } static get unloadTheme() { return this.unloadContent } - static get reloadTheme() { return this.reloadContent } + static async reloadTheme(theme) { + theme = await this.reloadContent(theme); + theme.recompile(); + } static enableTheme(theme) { theme.enable(); @@ -63,12 +66,6 @@ export default class ThemeManager extends ContentManager { theme.disable(); } - static get unloadTheme() { return this.unloadContent } - static async reloadTheme(theme) { - theme = await this.reloadContent(theme); - theme.recompile(); - } - static get isTheme() { return this.isThisContent } static isThisContent(theme) { return theme instanceof Theme;