Fix error when trying to cache an actor without a public key
This commit is contained in:
parent
0e5aa15715
commit
bd24f4e480
|
@ -57,6 +57,8 @@ export async function getCachedActor(url: string): Promise<ActorObject | null> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function cacheActor(actorObject: ActorObject) {
|
async function cacheActor(actorObject: ActorObject) {
|
||||||
|
if (!actorObject.publicKey) return;
|
||||||
|
|
||||||
function getIconUrl(icon: string | object): string {
|
function getIconUrl(icon: string | object): string {
|
||||||
return icon instanceof String ? icon : (icon as any).url;
|
return icon instanceof String ? icon : (icon as any).url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue