@hmcts/one-per-page
Advanced tools
Comparing version 4.0.7 to 4.1.0
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://github.com/hmcts/one-per-page#readme", | ||
"version": "4.0.7", | ||
"version": "4.1.0", | ||
"main": "./src/main.js", | ||
@@ -8,0 +8,0 @@ "repository": { |
const BaseStep = require('./BaseStep'); | ||
const addLocals = require('../middleware/addLocals'); | ||
const { METHOD_NOT_ALLOWED } = require('http-status-codes'); | ||
const { loadStepContent } = require('../i18n/loadStepContent'); | ||
const resolveTemplate = require('../middleware/resolveTemplate'); | ||
@@ -9,2 +8,3 @@ const { i18NextInstance } = require('../i18n/i18Next'); | ||
const { defined } = require('../util/checks'); | ||
const loadStepContent = require('../middleware/loadStepContent'); | ||
@@ -42,7 +42,11 @@ const notLocals = [ | ||
this.content = new Proxy(i18NextInstance, contentProxy(this)); | ||
this.waitFor(loadStepContent(this, i18NextInstance)); | ||
} | ||
get middleware() { | ||
return [...super.middleware, resolveTemplate, addLocals]; | ||
return [ | ||
loadStepContent(this), | ||
...super.middleware, | ||
resolveTemplate, | ||
addLocals | ||
]; | ||
} | ||
@@ -49,0 +53,0 @@ |
1347039
259
9031