[client] Fix migration page when migrating from/to the same account twice, resolves #514
/ test-build (push) Successful in 1m18s Details

This commit is contained in:
Laura Hausmann 2024-02-10 15:52:48 +01:00
parent 4b20ab6ad4
commit 63fa244ea8
Signed by: zotan
GPG Key ID: D044E84C5BE01605
1 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,7 @@ import { i18n } from "@/i18n";
import { definePageMetadata } from "@/scripts/page-metadata";
import { $i } from "@/account";
import { toString } from "iceshrimp-js/built/acct";
import { unique } from "@/scripts/array.js";
let moveToAccount = $ref("");
let accountAlias = $ref([""]);
@ -68,7 +69,7 @@ await init();
async function init() {
if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) {
const aka = await os.api("users/show", { userIds: $i.alsoKnownAs });
const aka = await os.api("users/show", { userIds: unique($i.alsoKnownAs) });
accountAlias =
aka && aka.length > 0
? aka.map((user) => `@${toString(user)}`)