Fix error when trying to cache an actor without a public key

This commit is contained in:
Shadowfacts 2019-09-18 08:25:11 -04:00
parent 0e5aa15715
commit bd24f4e480
Signed by untrusted user: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ export async function getCachedActor(url: string): Promise<ActorObject | null> {
}
async function cacheActor(actorObject: ActorObject) {
if (!actorObject.publicKey) return;
function getIconUrl(icon: string | object): string {
return icon instanceof String ? icon : (icon as any).url;
}