Fixed issue where themes without `templates` defined in `plugin.json`

did not have their templates added upon startup (backwards
compatibility re-established now)

Thanks @pichalite, for the debug!
v1.18.x
Julian Lam 9 years ago
parent 9836b6d464
commit 8f47a0c653

@ -153,8 +153,8 @@ var fs = require('fs'),
Plugins.showInstalled(function(err, plugins) {
async.each(plugins, function(plugin, next) {
if (plugin.templates && plugin.id && plugin.active) {
var templatesPath = path.join(__dirname, '../node_modules', plugin.id, plugin.templates);
if (plugin.id && plugin.active && (plugin.templates || plugin.id.startsWith('nodebb-theme-'))) {
var templatesPath = path.join(__dirname, '../node_modules', plugin.id, plugin.templates || 'templates');
utils.walk(templatesPath, function(err, pluginTemplates) {
if (pluginTemplates) {
pluginTemplates.forEach(function(pluginTemplate) {

Loading…
Cancel
Save