diff --git a/packages/core/src/modules/proofs/models/AttributeFilter.ts b/packages/core/src/modules/proofs/models/AttributeFilter.ts index 7a24c0aa6d..8e863ba1c0 100644 --- a/packages/core/src/modules/proofs/models/AttributeFilter.ts +++ b/packages/core/src/modules/proofs/models/AttributeFilter.ts @@ -3,15 +3,17 @@ import { IsOptional, IsString, ValidateNested } from 'class-validator' export class AttributeValue { public constructor(options: AttributeValue) { - this.name = options.name - this.value = options.value + if (options) { + this.name = options.name + this.value = options.value + } } @IsString() - public name: string + public name!: string @IsString() - public value: string + public value!: string } export class AttributeFilter {