@formio/js 5.0.0-rc.97 → 5.0.0-rc.98

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@
12
12
 
13
13
  /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
14
14
 
15
- /*! formiojs v5.0.0-rc.97 | https://unpkg.com/formiojs@5.0.0-rc.97/LICENSE.txt */
15
+ /*! formiojs v5.0.0-rc.98 | https://unpkg.com/formiojs@5.0.0-rc.98/LICENSE.txt */
16
16
 
17
17
  /**
18
18
  * @license
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
22
22
 
23
- /*! formiojs v5.0.0-rc.97 | https://unpkg.com/formiojs@5.0.0-rc.97/LICENSE.txt */
23
+ /*! formiojs v5.0.0-rc.98 | https://unpkg.com/formiojs@5.0.0-rc.98/LICENSE.txt */
24
24
 
25
25
  /**
26
26
  * @license
@@ -332,9 +332,8 @@ class RadioComponent extends ListComponent_1.default {
332
332
  label: this.component.valueProperty ? this.itemTemplate(item, valueAtProperty) : this.itemTemplate(item, item, i)
333
333
  };
334
334
  listData.push(this.templateData[this.component.valueProperty ? valueAtProperty : i]);
335
- if ((this.component.valueProperty || !this.isRadio) && (lodash_1.default.isUndefined(valueAtProperty) ||
336
- (!this.isRadio && lodash_1.default.isObject(valueAtProperty)) ||
337
- (!this.isRadio && lodash_1.default.isBoolean(valueAtProperty)))) {
335
+ const value = this.loadedOptions[i].value;
336
+ if (!this.isRadio && (lodash_1.default.isObject(value) || lodash_1.default.isBoolean(value) || lodash_1.default.isUndefined(value))) {
338
337
  this.loadedOptions[i].invalid = true;
339
338
  }
340
339
  });
@@ -332,9 +332,8 @@ export default class RadioComponent extends ListComponent {
332
332
  label: this.component.valueProperty ? this.itemTemplate(item, valueAtProperty) : this.itemTemplate(item, item, i)
333
333
  };
334
334
  listData.push(this.templateData[this.component.valueProperty ? valueAtProperty : i]);
335
- if ((this.component.valueProperty || !this.isRadio) && (_.isUndefined(valueAtProperty) ||
336
- (!this.isRadio && _.isObject(valueAtProperty)) ||
337
- (!this.isRadio && _.isBoolean(valueAtProperty)))) {
335
+ const value = this.loadedOptions[i].value;
336
+ if (!this.isRadio && (_.isObject(value) || _.isBoolean(value) || _.isUndefined(value))) {
338
337
  this.loadedOptions[i].invalid = true;
339
338
  }
340
339
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.97",
3
+ "version": "5.0.0-rc.98",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {