From a2c54c1da086b0f53f631d66e23faccb66d1c883 Mon Sep 17 00:00:00 2001 From: Nic Lake Date: Tue, 28 May 2024 10:40:12 -0500 Subject: [PATCH] Use fetch().then() --- src/components/Person.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Person.js b/src/components/Person.js index 957aa6e9..a0b630e6 100644 --- a/src/components/Person.js +++ b/src/components/Person.js @@ -19,7 +19,7 @@ export default function Person({ person }) { : null; const webfinger = person.mastodon - ? JSON.parse(`https://${mastodonArr[0]}/.well-known/webfinger?resource=https://${mastodonArr[0]}/@${mastodonArr[1]}`) + ? fetch(`https://${mastodonArr[0]}/.well-known/webfinger?resource=https://${mastodonArr[0]}/@${mastodonArr[1]}`).then(response => response.json()) : null; const wfIndex = person.mastodon && webfinger