diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-26 08:50:34 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-26 08:50:34 +0900 |
| commit | 506c8a259becee338f4aabb2307a5c68e6891589 (patch) | |
| tree | b385de082d866b0a78d56984773579c8c68ed5b7 /packages/frontend/src/utility | |
| parent | Update CHANGELOG.md (diff) | |
| download | misskey-506c8a259becee338f4aabb2307a5c68e6891589.tar.gz misskey-506c8a259becee338f4aabb2307a5c68e6891589.tar.bz2 misskey-506c8a259becee338f4aabb2307a5c68e6891589.zip | |
refactor
Diffstat (limited to 'packages/frontend/src/utility')
| -rw-r--r-- | packages/frontend/src/utility/admin-lookup.ts | 4 | ||||
| -rw-r--r-- | packages/frontend/src/utility/get-note-menu.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/utility/admin-lookup.ts b/packages/frontend/src/utility/admin-lookup.ts index 7405e229fe..eccc88d8a9 100644 --- a/packages/frontend/src/utility/admin-lookup.ts +++ b/packages/frontend/src/utility/admin-lookup.ts @@ -12,7 +12,7 @@ export async function lookupUser() { const { canceled, result } = await os.inputText({ title: i18n.ts.usernameOrUserId, }); - if (canceled) return; + if (canceled || result == null) return; const show = (user) => { os.pageWindow(`/admin/user/${user.id}`); @@ -46,7 +46,7 @@ export async function lookupUserByEmail() { title: i18n.ts.emailAddress, type: 'email', }); - if (canceled) return; + if (canceled || result == null) return; try { const user = await os.apiWithDialog('admin/accounts/find-by-email', { email: result }); diff --git a/packages/frontend/src/utility/get-note-menu.ts b/packages/frontend/src/utility/get-note-menu.ts index 11c87dc653..f7b56040cc 100644 --- a/packages/frontend/src/utility/get-note-menu.ts +++ b/packages/frontend/src/utility/get-note-menu.ts @@ -179,7 +179,7 @@ export function getNoteMenu(props: { translating: Ref<boolean>; currentClip?: Misskey.entities.Clip; }) { - const appearNote = getAppearNote(props.note); + const appearNote = getAppearNote(props.note) ?? props.note; const link = appearNote.url ?? appearNote.uri; const cleanups = [] as (() => void)[]; @@ -554,7 +554,7 @@ export function getRenoteMenu(props: { renoteButton: ShallowRef<HTMLElement | null | undefined>; mock?: boolean; }) { - const appearNote = getAppearNote(props.note); + const appearNote = getAppearNote(props.note) ?? props.note; const channelRenoteItems: MenuItem[] = []; const normalRenoteItems: MenuItem[] = []; |