nhsuk-decorated-components 0.4.0 → 0.4.1
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/lib/decorate.js +3 -2
- package/package.json +2 -2
package/lib/decorate.js
CHANGED
|
@@ -124,13 +124,14 @@ export function decorate(params, keyPath, componentName) {
|
|
|
124
124
|
selectedValue = item.selected
|
|
125
125
|
} else if (Array.isArray(storedValue)) {
|
|
126
126
|
// Stored value is an array, check it exists in the array
|
|
127
|
-
|
|
127
|
+
const storedValues = storedValue.map(value => String(value))
|
|
128
|
+
if (storedValues.indexOf(String(item.value)) !== -1) {
|
|
128
129
|
checkedValue = 'checked'
|
|
129
130
|
selectedValue = 'selected'
|
|
130
131
|
}
|
|
131
132
|
} else {
|
|
132
133
|
// Stored value is a simple value, check it matches
|
|
133
|
-
if (storedValue === String(item.value)) {
|
|
134
|
+
if (String(storedValue) === String(item.value)) {
|
|
134
135
|
checkedValue = 'checked'
|
|
135
136
|
selectedValue = 'selected'
|
|
136
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nhsuk-decorated-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Form components for the NHS.UK Design System that require less parameters to collect data",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nhsuk",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"lint:fix": "npm run lint:prettier:fix && npm run lint:js:fix",
|
|
32
32
|
"test": "NODE_ENV=test node --test",
|
|
33
33
|
"coverage": "NODE_ENV=test node --test --experimental-test-coverage",
|
|
34
|
-
"release": "np"
|
|
34
|
+
"release": "np --no-publish"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|