From dbcf85e6208ea23fb54bcb0b70884090b4cc9d04 Mon Sep 17 00:00:00 2001 From: riku6460 <17585784+riku6460@users.noreply.github.com> Date: Sun, 25 Feb 2024 03:38:19 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=90=E3=83=83=E3=82=AF=E3=82=A2=E3=83=83?= =?UTF-8?q?=E3=83=97=E5=90=8D=E3=81=8C=20null=20=E3=81=AE=E3=83=90?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=A2=E3=83=83=E3=83=97=E3=81=8C=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=A7=E3=81=8D=E5=89=8A=E9=99=A4=E3=81=AA=E3=81=A9?= =?UTF-8?q?=E3=81=AE=E6=93=8D=E4=BD=9C=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(MisskeyIO#474)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/os.ts | 2 +- .../frontend/src/pages/settings/preferences-backups.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index 7f33c46e24..4fd6d87e28 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -289,7 +289,7 @@ export function inputText(props: { }, }, { done: result => { - resolve(result ? result : { canceled: true }); + resolve(typeof result.result === 'string' ? result : { canceled: true, result: undefined }); }, }, 'closed'); }); diff --git a/packages/frontend/src/pages/settings/preferences-backups.vue b/packages/frontend/src/pages/settings/preferences-backups.vue index aa226f671a..34372572d6 100644 --- a/packages/frontend/src/pages/settings/preferences-backups.vue +++ b/packages/frontend/src/pages/settings/preferences-backups.vue @@ -278,7 +278,7 @@ async function applyProfile(id: string): Promise { const { canceled: cancel1 } = await os.confirm({ type: 'warning', title: ts._preferencesBackups.apply, - text: t('_preferencesBackups.applyConfirm', { name: profile.name }), + text: t('_preferencesBackups.applyConfirm', { name: profile.name || '' }), }); if (cancel1) return; @@ -336,7 +336,7 @@ async function deleteProfile(id: string): Promise { const { canceled } = await os.confirm({ type: 'info', title: ts.delete, - text: t('deleteAreYouSure', { x: profiles.value[id].name }), + text: t('deleteAreYouSure', { x: profiles.value[id].name || '' }), }); if (canceled) return; @@ -352,7 +352,7 @@ async function save(id: string): Promise { const { canceled } = await os.confirm({ type: 'info', title: ts._preferencesBackups.save, - text: t('_preferencesBackups.saveConfirm', { name }), + text: t('_preferencesBackups.saveConfirm', { name: name || '' }), }); if (canceled) return; @@ -387,7 +387,7 @@ async function rename(id: string): Promise { const { canceled: cancel2 } = await os.confirm({ type: 'info', title: ts.rename, - text: t('_preferencesBackups.renameConfirm', { old: registry.name, new: name }), + text: t('_preferencesBackups.renameConfirm', { old: registry.name || '', new: name }), }); if (cancel2) return;