fix build bug

This commit is contained in:
AC
2025-06-11 15:43:43 +08:00
parent cd0366392a
commit f72aadc35d
7 changed files with 32 additions and 11 deletions

View File

@@ -967,7 +967,9 @@ export function DeleteImageButton(props: { deleteImage: () => void }) {
}
export function ShortcutKeyModal(props: { onClose: () => void }) {
const isMac = navigator.platform.toUpperCase().indexOf("MAC") >= 0;
const isMac =
typeof navigator !== "undefined" &&
navigator.platform.toUpperCase().indexOf("MAC") >= 0;
const shortcuts = [
{
title: Locale.Chat.ShortcutKey.newChat,