From 3ff3698d814deb8f3d9c3ea9a6d0f7ce71523ab6 Mon Sep 17 00:00:00 2001 From: David McFadzean Date: Mon, 18 Mar 2024 17:43:11 -0400 Subject: [PATCH] Fixed verifyDb when db empty --- gatekeeper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gatekeeper.js b/gatekeeper.js index bc85c14f..b3203592 100644 --- a/gatekeeper.js +++ b/gatekeeper.js @@ -34,6 +34,11 @@ export function writeDb(db) { export async function verifyDb() { const db = loadDb(); + + if (!db.anchors) { + return 0; + } + const dids = Object.keys(db.anchors); let n = 0; let invalid = 0;