lmao, wtf?

my brain just exploded trying to figure out what this is doing here
v1.18.x
psychobunny 10 years ago
parent d5d686b701
commit 8de978fbcf

@ -6,16 +6,11 @@ var path = require('path'),
meta = require('../meta'),
db = require('../database'),
plugins = require('../plugins'),
middleware = require('../middleware'),
minificationEnabled = false;
middleware = require('../middleware');
function sendMinifiedJS(req, res, next) {
if (!minificationEnabled) {
res.set('X-SourceMap', '/nodebb.min.js.map');
}
res.set('X-SourceMap', '/nodebb.min.js.map');
return res.type('text/javascript').send(meta.js.cache);
}
@ -58,8 +53,6 @@ module.exports = function(app, middleware, controllers) {
app.get('/robots.txt', controllers.robots);
app.get('/css/previews/:theme', controllers.admin.themes.get);
if (!minificationEnabled) {
app.get('/nodebb.min.js.map', middleware.addExpiresHeaders, sendSourceMap);
setupPluginSourceMapping(app);
}
app.get('/nodebb.min.js.map', middleware.addExpiresHeaders, sendSourceMap);
setupPluginSourceMapping(app);
};

Loading…
Cancel
Save