Node.js based forum software built for the modern web
Fixed issue where themes without `templates` defined in `plugin.json` did not have their templates added upon startup (backwards compatibility re-established now)
Julian Lam8f47a0c653ca
diff --git a/src/plugins.js b/src/plugins.jsindex f7ef80c984..fcc2a11576 100644--- a/src/plugins.js+++ b/src/plugins.js@@ -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) {