Fix avatar update
This commit is contained in:
parent
7d233f1dd9
commit
1c5fbed209
|
@ -176,8 +176,8 @@ async function updateActorAvatarInstance (actor: MActorDefault, info: AvatarInfo
|
||||||
if (!info.name) return actor
|
if (!info.name) return actor
|
||||||
|
|
||||||
if (actor.Avatar) {
|
if (actor.Avatar) {
|
||||||
// Don't update the avatar if the filename did not change
|
// Don't update the avatar if the file URL did not change
|
||||||
if (actor.Avatar.fileUrl === info.fileUrl) return actor
|
if (info.fileUrl && actor.Avatar.fileUrl === info.fileUrl) return actor
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await actor.Avatar.destroy({ transaction: t })
|
await actor.Avatar.destroy({ transaction: t })
|
||||||
|
|
Loading…
Reference in New Issue