mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 04:15:55 +02:00
refactor
This commit is contained in:
@@ -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 });
|
||||
|
||||
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user