5htp-core 0.3.9-1 → 0.3.9-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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp-core",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.3.9-1",
4
+ "version": "0.3.9-2",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp-core.git",
7
7
  "license": "MIT",
@@ -124,7 +124,8 @@ export default class SchemaValidators {
124
124
  const checkChoice = ( choice: any ) => {
125
125
 
126
126
  // Choice object = extract value
127
- if (typeof choice === 'object' && ('value' in choice) && typeof choice.value !== 'object')
127
+ // We check for choice objec via the label prop, as the value can be undefined (and so, not transmitted)
128
+ if (typeof choice === 'object' && ('label' in choice) && typeof choice.label === 'string' && typeof choice.value !== 'object')
128
129
  choice = choice.value;
129
130
 
130
131
  // If choices list rpovided, check if the choice is in the choices list