Skip to content

Commit

Permalink
fix: add option check to attribute constructor (#450)
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra timo@animo.id
  • Loading branch information
TimoGlastra authored Sep 1, 2021
1 parent 74d6c60 commit 8aad3e9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/core/src/modules/proofs/models/AttributeFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8aad3e9

Please sign in to comment.