diff --git a/lib/static/views.js b/lib/static/views.js index 2579f05ff9b6f0cbfcbb1d1d4d702ad9ab417a47..800eb4b19e5229a54ece1d1e585bf8a9266ca749 100644 --- a/lib/static/views.js +++ b/lib/static/views.js @@ -234,21 +234,13 @@ exports.setup = function(app) { if (!config.get('use_minified_resources')) { var templates = require('../templates'); var dialogTemplatesPath = path.join(__dirname, '../../resources/static/dialog/views') - var dialogTemplatesData; app.get('/common/js/templates.js', function(req, res) { - var str = templates.generate(dialogTemplatesPath); - if (str) dialogTemplatesData = str; - - res.send(dialogTemplatesData); + res.send(templates.generate(dialogTemplatesPath)); }); var siteTemplatesPath = path.join(__dirname, "../../resources/views"); - var siteTemplatesData; app.get('/test/mocks/site-templates.js', function(req, res) { - var str = templates.generate(siteTemplatesPath, "site/"); - if (str) siteTemplatesData = str; - - res.send(siteTemplatesData); + res.send(templates.generate(siteTemplatesPath, "site/")); }); }