mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
@@ -192,7 +192,7 @@ middleware.delayLoading = function (req, res, next) {
|
||||
var viewsDir = nconf.get('views_dir');
|
||||
middleware.templatesOnDemand = function (req, res, next) {
|
||||
var filePath = req.filePath || path.join(viewsDir, req.path);
|
||||
if (!filePath.endsWith('.jst')) {
|
||||
if (!filePath.endsWith('.js')) {
|
||||
return next();
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ middleware.templatesOnDemand = function (req, res, next) {
|
||||
return next();
|
||||
}
|
||||
|
||||
fs.readFile(filePath.replace(/\.jst$/, '.tpl'), cb);
|
||||
fs.readFile(filePath.replace(/\.js$/, '.tpl'), cb);
|
||||
},
|
||||
function (source, cb) {
|
||||
Benchpress.precompile({
|
||||
|
||||
Reference in New Issue
Block a user