Make locals override globals instead of the inverse

This commit is contained in:
Alice Gaudon 2021-05-13 17:39:20 +02:00
parent 13bd933b0b
commit c36e4c0fbe
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ export default abstract class ViewEngine extends AssetPreCompiler {
public setup(app: Express, main: boolean): void {
app.engine(this.extension, (path, options, callback) => {
// Props (locals)
const locals = Object.assign(options, this.getGlobals().get());
const locals = Object.assign(this.getGlobals().get(), options);
this.render(path, locals)
.then(value => callback(null, value))