diff --git a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts index fdb306ff76..d259566cc5 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts @@ -58,6 +58,13 @@ describe("UriOptionComponent", () => { expect(component["uriMatchOptions"][0].label).toBe("default"); }); + it("should update the default uri match strategy label when it is domain", () => { + component.defaultMatchDetection = UriMatchStrategy.Domain; + fixture.detectChanges(); + + expect(component["uriMatchOptions"][0].label).toBe("defaultLabel baseDomain"); + }); + it("should update the default uri match strategy label", () => { component.defaultMatchDetection = UriMatchStrategy.Exact; fixture.detectChanges(); diff --git a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts index 82870befa1..4af80ed464 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts @@ -84,7 +84,7 @@ export class UriOptionComponent implements ControlValueAccessor { @Input({ required: true }) set defaultMatchDetection(value: UriMatchStrategySetting) { // The default selection has a value of `null` avoid showing "Default (Default)" - if (!value) { + if (value === null) { return; }