Skip to content

Commit

Permalink
Add check and warning for empty values array
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jan 28, 2019
1 parent e06730b commit 0e5a6ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vaadin-custom-field-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@
return;
}

const valuesArray = this.i18n.parseValue(value, this.inputs);
const valuesArray = this.i18n.parseValue(value);
if (!valuesArray || valuesArray.length == 0) {
console.warn('Value parser has not provided values array');
}

this.inputs.forEach((input, id) => input.value = valuesArray[id]);
if (oldValue !== undefined) {
this.validate();
Expand Down

0 comments on commit 0e5a6ac

Please sign in to comment.