MOBILE-3039 data: Fix required textarea fields offline

main
Albert Gasset 2019-05-30 11:12:36 +02:00
parent 8d8e8a11b4
commit 09b95dbd97
1 changed files with 2 additions and 4 deletions

View File

@ -103,11 +103,9 @@ export class AddonModDataFieldTextareaHandler extends AddonModDataFieldTextHandl
return this.translate.instant('addon.mod_data.errormustsupplyvalue');
}
const found = inputData.some((input) => {
return !input.subfield && this.textUtils.htmlIsBlank(input.value);
});
const value = inputData.find((value) => value.subfield == '');
if (!found) {
if (!value || this.textUtils.htmlIsBlank(value.value)) {
return this.translate.instant('addon.mod_data.errormustsupplyvalue');
}
}