From b139957e3e14f6d06fb34c4368cf8c0ca7d3a344 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Mon, 3 Jul 2023 18:44:42 +0800 Subject: [PATCH] Added identity check --- src/components/World/components/objects/landmarks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/World/components/objects/landmarks.js b/src/components/World/components/objects/landmarks.js index 3c6dbfa..a460337 100644 --- a/src/components/World/components/objects/landmarks.js +++ b/src/components/World/components/objects/landmarks.js @@ -23,6 +23,9 @@ export async function loadLandmarks(vue, world, scene, loop) { const accounts = await accountsDB.accounts.toArray(); const account = R.find((acc) => acc.did === activeDid, accounts); const identity = JSON.parse(account?.identity || "undefined"); + if (!identity) { + throw new Error("No identity found."); + } const token = await accessToken(identity); const url = apiServer + "/api/v2/report/claims?claimType=GiveAction";