From 7a303eb61918a852e83505a0342aade540859f1d Mon Sep 17 00:00:00 2001 From: Mayne Date: Tue, 29 Oct 2024 02:38:37 +0800 Subject: [PATCH] fix: crash when calling the script via cmdk (#185) * fix: crash when calling the script via cmdk * Update to version 0.8.1 --- components/cmdk/index.tsx | 4 ++-- lib/env.ts | 2 +- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/cmdk/index.tsx b/components/cmdk/index.tsx index 11b4dfa7..6ac9df6e 100644 --- a/components/cmdk/index.tsx +++ b/components/cmdk/index.tsx @@ -86,6 +86,8 @@ export function CommandDialogDemo() { goto(`/${lastOpenedDatabase}/${docId}`)() } + const { t } = useTranslation() + if (mode === "action") { return } @@ -93,8 +95,6 @@ export function CommandDialogDemo() { return } - const { t } = useTranslation() - return (