From 142e33eb056cea6a8fc3f9b1e49e829278137bb2 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 7 Dec 2017 14:01:27 -0500 Subject: [PATCH] explicitly set boolean autofill value to false resolves #422 --- src/services/autofill.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 391105453d..25f02a7146 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -1,4 +1,5 @@ import { CipherType } from '../enums/cipherType.enum'; +import { FieldType } from '../enums/fieldType.enum'; import AutofillField from '../models/domain/autofillField'; import AutofillPageDetails from '../models/domain/autofillPageDetails'; @@ -263,9 +264,14 @@ export default class AutofillService { const matchingIndex = this.findMatchingFieldIndex(field, fieldNames); if (matchingIndex > -1) { + let val = fields[matchingIndex].value; + if (val == null && fields[matchingIndex].type == FieldType.Boolean) { + val = 'false'; + } + filledFields[field.opid] = field; fillScript.script.push(['click_on_opid', field.opid]); - fillScript.script.push(['fill_by_opid', field.opid, fields[matchingIndex].value]); + fillScript.script.push(['fill_by_opid', field.opid, val]); } }); }