Skip to content

Commit 447e87c

Browse files
authored
Merge pull request matrix-org#5422 from matrix-org/t3chguy/fix/_940
Fix BaseAvatar sometimes messing up and duplicating the url
2 parents 962b964 + 75888fb commit 447e87c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/views/avatars/BaseAvatar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ const calculateUrls = (url, urls) => {
5151
_urls = urls || [];
5252

5353
if (url) {
54-
_urls.unshift(url); // put in urls[0]
54+
// copy urls and put url first
55+
_urls = [url, ..._urls];
5556
}
5657
}
5758

0 commit comments

Comments
 (0)