mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
don't crash if there is no pluginData
This commit is contained in:
@@ -50,9 +50,11 @@ function getTemplateDirs(activePlugins, callback) {
|
||||
if (id.startsWith('nodebb-theme-')) {
|
||||
return nconf.get('theme_templates_path');
|
||||
}
|
||||
|
||||
if (!plugins.pluginsData[id]) {
|
||||
return '';
|
||||
}
|
||||
return path.join(__dirname, '../../node_modules/', id, plugins.pluginsData[id].templates || 'templates');
|
||||
});
|
||||
}).filter(Boolean);
|
||||
|
||||
var themeConfig = require(nconf.get('theme_config'));
|
||||
var theme = themeConfig.baseTheme;
|
||||
|
||||
Reference in New Issue
Block a user