hof 21.1.0-deindex-toggle-beta → 21.1.0

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.
Files changed (2) hide show
  1. package/lib/deindex.js +4 -3
  2. package/package.json +1 -1
package/lib/deindex.js CHANGED
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = (app, config) => {
4
- const deIndex = config.deIndexForm;
4
+ // Ensure the value of deIndex is evaluated as a boolean regardless of if single quotes are used
5
+ // to have the expected conditional behaviour in the Mustache template
6
+ const deIndex = (config.deIndexForm === 'true' || config.deIndexForm === true);
5
7
 
6
8
  app.use((req, res, next) => {
7
-
8
9
  // Preparing common res.locals properties
9
10
  const properties = {
10
11
  deIndex: deIndex
@@ -14,4 +15,4 @@ module.exports = (app, config) => {
14
15
  });
15
16
 
16
17
  return app;
17
- }
18
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hof",
3
3
  "description": "A bootstrap for HOF projects",
4
- "version": "21.1.0-deindex-toggle-beta",
4
+ "version": "21.1.0",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",