hof 20.1.6 → 20.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -103,9 +103,11 @@ module.exports = class Controller extends BaseController {
103
103
  const locals = super.locals(req, res);
104
104
  const stepLocals = req.form.options.locals || {};
105
105
 
106
- const fields = _.map(req.form.options.fields, (field, key) =>
106
+ let fields = _.map(req.form.options.fields, (field, key) =>
107
107
  Object.assign({}, field, { key })
108
108
  );
109
+ // only include fields that aren't dependents to mitigate duplicate fields on the page
110
+ fields = fields.filter(field => !req.form.options.fields[field.key].dependent);
109
111
 
110
112
  return _.extend({}, locals, {
111
113
  fields,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "20.1.6",
4
+ "version": "20.1.7",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -25,7 +25,7 @@
25
25
  "unit": "LOG_LEVEL=error nyc _mocha \"test/**/*.spec.js\" \"sandbox/test/**/*.spec.js\"",
26
26
  "unit:nocov": "LOG_LEVEL=error mocha \"test/**/*.spec.js\" \"sandbox/test/**/*.spec.js\"",
27
27
  "test:lint": "eslint . --config ./node_modules/eslint-config-hof/default.js",
28
- "test:functional": "funkie mocha ./test/functional-tests --exit",
28
+ "test:functional": "funkie mocha ./test/functional-tests --timeout 20000 --exit",
29
29
  "test:client": "karma start test/frontend/toolkit/karma.conf.js",
30
30
  "test:cookie-banner": "jest test/frontend/jest",
31
31
  "test:acceptance": "TAGS=\"${TAGS:=@feature}\" yarn run test:cucumber",