From eed3c335f250ea0e9f786aa34b1a0372d4fb4ae6 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 16 Sep 2019 18:59:21 -0400 Subject: [PATCH] Fix error on fetching actor I'm not sure what's actually causing it, but this prevents it from clogging up the log. --- lib/activitypub/federate.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/activitypub/federate.ts b/lib/activitypub/federate.ts index 43e670a..23f78aa 100644 --- a/lib/activitypub/federate.ts +++ b/lib/activitypub/federate.ts @@ -72,7 +72,10 @@ async function cacheActor(actorObject: ActorObject) { await getConnection().manager.save(actor); } -async function fetchActor(url: string): Promise { +async function fetchActor(url?: string): Promise { + if (!url) { + return Promise.resolve(null); + } return new Promise((resolve, reject) => { request({ url,