Fix error on fetching actor

I'm not sure what's actually causing it, but this prevents it from
clogging up the log.
This commit is contained in:
Shadowfacts 2019-09-16 18:59:21 -04:00
parent 605aaab747
commit eed3c335f2
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 1 deletions

View File

@ -72,7 +72,10 @@ async function cacheActor(actorObject: ActorObject) {
await getConnection().manager.save(actor); await getConnection().manager.save(actor);
} }
async function fetchActor(url: string): Promise<ActorObject | null> { async function fetchActor(url?: string): Promise<ActorObject | null> {
if (!url) {
return Promise.resolve(null);
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
request({ request({
url, url,