From 9237f219733f8a997fe8d37eabcfb5cdf9e3844e Mon Sep 17 00:00:00 2001 From: Sai Ranjit Tummalapalli Date: Wed, 6 Dec 2023 15:54:47 +0530 Subject: [PATCH] fix: condition to check if did doc already exists (#16) Signed-off-by: Sai Ranjit Tummalapalli --- src/registrar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar.ts b/src/registrar.ts index 80af2ce..3b06fcc 100644 --- a/src/registrar.ts +++ b/src/registrar.ts @@ -68,7 +68,7 @@ export class PolygonDID { const resolveDidDoc = await this.registry.getDIDDoc(parsedDid.didAddress) - if (!resolveDidDoc) { + if (resolveDidDoc) { throw new Error('The DID document already registered!') }