diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 1ba2ee2539..0a74197ace 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -1067,7 +1067,7 @@ export default class AutofillService implements AutofillServiceInterface { } private fillByOpid(fillScript: AutofillScript, field: AutofillField, value: string): void { - if (field.maxLength && value.length > field.maxLength) { + if (field.maxLength && value && value.length > field.maxLength) { value = value.substr(0, value.length); } fillScript.script.push(['click_on_opid', field.opid]);