mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
Fix importing of templates served by plugins
This commit is contained in:
@@ -419,7 +419,7 @@ var fs = require('fs'),
|
|||||||
var templatesPath = path.join(__dirname, '../node_modules', plugin.id, plugin.templates);
|
var templatesPath = path.join(__dirname, '../node_modules', plugin.id, plugin.templates);
|
||||||
utils.walk(templatesPath, function(err, pluginTemplates) {
|
utils.walk(templatesPath, function(err, pluginTemplates) {
|
||||||
pluginTemplates.forEach(function(pluginTemplate) {
|
pluginTemplates.forEach(function(pluginTemplate) {
|
||||||
templates[pluginTemplate.replace(templatesPath, '').substring(1)] = pluginTemplate;
|
templates["/" + pluginTemplate.replace(templatesPath, '').substring(1)] = pluginTemplate;
|
||||||
});
|
});
|
||||||
|
|
||||||
next(err);
|
next(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user