Skip to content

Node.js based forum software built for the modern web

fixed another hardcoded prefix value

Julian Lamb0464ff91249
diff --git a/src/routes/meta.js b/src/routes/meta.js
index cfe258022a..af10e84021 100644
--- a/src/routes/meta.js
+++ b/src/routes/meta.js
@@ -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);
});