hof 21.2.0-postcode-lookup-beta.4 → 21.2.0-postcode-lookup-beta.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- /* eslint-disable func-names */
1
+ /* eslint-disable func-names, max-len */
2
2
  'use strict';
3
3
 
4
4
  const path = require('path');
@@ -222,7 +222,7 @@ module.exports = config => {
222
222
  locals(req, res, callback) {
223
223
  const isManualStep = req.query.step === 'manual';
224
224
  const locals = super.locals(req, res, callback);
225
- const sessionPostcode = req.sessionModel.get(`${addressFieldNamePrefix}-postcode`)?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
225
+ const sessionPostcode = req.sessionModel.get(`${addressFieldNamePrefix}-postcode`)?.replace(/[^\w]+/g, '').replace(/^(.*)(\d)/, '$1 $2');
226
226
  const section = this.options.route.replace(/^\//, '');
227
227
  const editLink = conditionalTranslate('pages.address-lookup.edit', req.translate) || defaults.CHANGE;
228
228
  const searchByPostcodeLink = conditionalTranslate('pages.address.searchByPostcode', req.translate) ||
@@ -279,7 +279,7 @@ module.exports = config => {
279
279
  // Clear the value stored in the addresses radio button group
280
280
  req.sessionModel.set(`${addressFieldNamePrefix}-select`, '');
281
281
  // Replace punctuation in postcode and call OS Places API to return list of addresses
282
- const enteredPostcode = req.form.values[`${addressFieldNamePrefix}-postcode`]?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
282
+ const enteredPostcode = req.form.values[`${addressFieldNamePrefix}-postcode`]?.replace(/[^\w]+/g, '').replace(/^(.*)(\d)/, '$1 $2');
283
283
 
284
284
  await PostcodeLookup(enteredPostcode, apiURL, apiKey)
285
285
  .then(function (response) {
@@ -343,7 +343,7 @@ module.exports = config => {
343
343
  saveValues(req, res, callback) {
344
344
  const step = req.query.step;
345
345
  if (step === 'postcode') {
346
- postcode = req.form.values[`${addressFieldNamePrefix}-postcode`]?.replace(/[^\w]+/g, "").replace(/^(.*)(\d)/, "$1 $2");
346
+ postcode = req.form.values[`${addressFieldNamePrefix}-postcode`]?.replace(/[^\w]+/g, '').replace(/^(.*)(\d)/, '$1 $2');
347
347
  this.clearAddressFieldValues(req);
348
348
  return this.postcode(req, res, err => {
349
349
  if (err) {
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.2.0-postcode-lookup-beta.4",
4
+ "version": "21.2.0-postcode-lookup-beta.6",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
7
7
  "author": "HomeOffice",
@@ -1,2 +0,0 @@
1
- {
2
- }