]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/activitypub/actor.ts
Update translations
[github/Chocobozzz/PeerTube.git] / server / lib / activitypub / actor.ts
index fd934443b8dd19725db0c495dd509443da6c5b25..9eabef4b0b175da39173af1825a62435256f7cc8 100644 (file)
@@ -176,8 +176,8 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
   if (!info.name) return actor
 
   if (actor.Avatar) {
-    // Don't update the avatar if the filename did not change
-    if (actor.Avatar.fileUrl === info.fileUrl) return actor
+    // Don't update the avatar if the file URL did not change
+    if (info.fileUrl && actor.Avatar.fileUrl === info.fileUrl) return actor
 
     try {
       await actor.Avatar.destroy({ transaction: t })