fixed another hardcoded prefix value

v1.18.x
Julian Lam 11 years ago
parent 86457558b0
commit b0464ff912

@ -34,10 +34,11 @@ function setupPluginSourceMapping(app) {
development mode (`./nodebb dev`)
*/
var routes = plugins.clientScripts,
mapping;
mapping,
prefix = __dirname.split(path.sep).length - 1;
routes.forEach(function(route) {
mapping = '/' + route.split('/').slice(7).join('/');
mapping = '/' + route.split('/').slice(prefix).join('/');
app.get(mapping, function(req, res) {
res.type('text/javascript').sendfile(route);
});

Loading…
Cancel
Save