Skip to content

Commit

Permalink
Error: empty JSON-LD query value, in ValueProof.validate when value i…
Browse files Browse the repository at this point in the history
…s 0 (#58)
  • Loading branch information
Kolezhniuk authored Apr 7, 2023
1 parent 14a0230 commit de708f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/circuits/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ export class ValueProof {
*
*/
validate(): void {
if (!this.path) {
if (typeof this.path !== 'bigint') {
throw new Error(CircuitError.EmptyJsonLDQueryPath);
}
if (!this.value) {
if (typeof this.value !== 'bigint') {
throw new Error(CircuitError.EmptyJsonLDQueryValue);
}
if (!this.mtp) {
Expand Down

0 comments on commit de708f3

Please sign in to comment.