missed one invocation of old LESS library, #2419

v1.18.x
Julian Lam 10 years ago
parent 207bfa8960
commit 23485fcbf3

@ -306,20 +306,19 @@ middleware.renderHeader = function(req, res, callback) {
return next(null, '');
}
var less = require('less');
var parser = new (less.Parser)();
if (!meta.config.customCSS) {
return next(null, '');
}
parser.parse(meta.config.customCSS, function(err, tree) {
var less = require('less');
less.render(meta.config.customCSS, function(err, lessObject) {
if (err) {
winston.error('[less] Could not convert custom LESS to CSS! Please check your syntax.');
return next(null, '');
}
next(null, tree ? tree.toCSS({cleancss: true}) : '');
next(null, lessObject.css);
});
},
customJS: function(next) {

Loading…
Cancel
Save