@4site/engrid-scripts 0.22.1 → 0.22.2

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.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AppVersion = "0.22.1";
1
+ export declare const AppVersion = "0.22.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const AppVersion = "0.22.1";
1
+ export const AppVersion = "0.22.2";
@@ -139,9 +139,13 @@ export class WelcomeBack {
139
139
  ENGrid.setBodyData("hide-fast-personal-details", false);
140
140
  return;
141
141
  }
142
- const regionFieldValue = ENGrid.getFieldValue("supporter.region");
142
+ const regionField = ENGrid.getField("supporter.region");
143
+ const regionFieldValue = regionField ? regionField.value : "";
144
+ const regionFieldType = regionField === null || regionField === void 0 ? void 0 : regionField.tagName.toLowerCase();
143
145
  const regionFieldLabel = document.querySelector(".en__field--region label");
144
- if (regionFieldLabel && regionFieldValue === "") {
146
+ if (regionFieldType === "select" &&
147
+ regionFieldLabel &&
148
+ regionFieldValue === "") {
145
149
  ENGrid.setError(".en__field--region", `${regionFieldLabel.innerText} is required`);
146
150
  ENGrid.setBodyData("hide-fast-personal-details", false);
147
151
  this._form.validate = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4site/engrid-scripts",
3
- "version": "0.22.1",
3
+ "version": "0.22.2",
4
4
  "description": "Scripts for the ENGRID Project",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "strongly-typed-events": "^2.0.9"
26
26
  },
27
27
  "homepage": "https://github.com/4site-interactive-studios/engrid#readme",
28
- "gitHead": "831fa83063d0b6b961ae9ebae68e5f31c15be7b9",
28
+ "gitHead": "fab50c9fa377f36deec8f098075591d55a7c5e2f",
29
29
  "devDependencies": {
30
30
  "nodemon": "^2.0.20"
31
31
  }