From e9736f436cf70be231b117e6bce5a7cbfe2c7319 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Tue, 12 Jul 2022 10:41:58 +0700 Subject: [PATCH] feat: have res.render return the compiled html --- controllers/middlewares/nunjucksRenderer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/middlewares/nunjucksRenderer.js b/controllers/middlewares/nunjucksRenderer.js index 529e761..a1f41c0 100644 --- a/controllers/middlewares/nunjucksRenderer.js +++ b/controllers/middlewares/nunjucksRenderer.js @@ -47,7 +47,8 @@ class NunjucksRenderer { resolve(html) }) }).then(html => { - return res.type('html').send(html) + res.type('html').send(html) + return html }) }