diff --git a/packages/nodos-core/lib/http/Response.js b/packages/nodos-core/lib/http/Response.js index 1a4eaabc..f3f61516 100644 --- a/packages/nodos-core/lib/http/Response.js +++ b/packages/nodos-core/lib/http/Response.js @@ -94,8 +94,8 @@ class Response { */ render(locals = {}, template = this.templateName) { this.responseType = 'rendering'; - // FIXME: check if property already exists - Object.assign(this.locals, locals); + const self = this; + Object.entries(locals).forEach(([key, value]) => self.addLocal(key, value)); this.templateName = template; }