diff --git a/electron.vite.config.ts b/electron.vite.config.ts
index 42fd9d29f..5c772e385 100644
--- a/electron.vite.config.ts
+++ b/electron.vite.config.ts
@@ -36,6 +36,7 @@ export default defineConfig({
"@env": resolve("./src/env.ts"),
},
},
+
plugins: [
react(),
sentryVitePlugin({
@@ -61,6 +62,7 @@ export default defineConfig({
],
build: {
sourcemap: !!process.env.CI,
+ target: "esnext",
},
define: {
APP_VERSION: JSON.stringify(pkg.version),
diff --git a/src/renderer/src/atoms/player.ts b/src/renderer/src/atoms/player.ts
index e1f4ff4fd..8f80e5e70 100644
--- a/src/renderer/src/atoms/player.ts
+++ b/src/renderer/src/atoms/player.ts
@@ -1,5 +1,6 @@
import { createAtomHooks } from "@renderer/lib/jotai"
import { getStorageNS } from "@renderer/lib/ns"
+import { noop } from "foxact/noop"
import { atomWithStorage, createJSONStorage } from "jotai/utils"
import type { SyncStorage } from "jotai/vanilla/utils/atomWithStorage"
@@ -104,7 +105,7 @@ export const AudioPlayer = {
status: "playing",
duration: this.audio.duration === Infinity ? 0 : this.audio.duration,
})
- })
+ }).catch(noop)
},
teardown() {
this.currentTimeTimer && clearInterval(this.currentTimeTimer)
diff --git a/src/renderer/src/components/common/ErrorElement.tsx b/src/renderer/src/components/common/ErrorElement.tsx
index 2f856324f..249732672 100644
--- a/src/renderer/src/components/common/ErrorElement.tsx
+++ b/src/renderer/src/components/common/ErrorElement.tsx
@@ -2,7 +2,7 @@ import { attachOpenInEditor } from "@renderer/lib/dev"
import { getNewIssueUrl } from "@renderer/lib/issues"
import { clearLocalPersistStoreData } from "@renderer/store/utils/clear"
import { useEffect, useRef } from "react"
-import { isRouteErrorResponse, useRouteError } from "react-router-dom"
+import { isRouteErrorResponse, useNavigate, useRouteError } from "react-router-dom"
import { toast } from "sonner"
import { Button } from "../ui/button"
@@ -10,6 +10,7 @@ import { PoweredByFooter } from "./PoweredByFooter"
export function ErrorElement() {
const error = useRouteError()
+ const navigate = useNavigate()
const message = isRouteErrorResponse(error) ?
`${error.status} ${error.statusText}` :
error instanceof Error ?
@@ -46,11 +47,7 @@ export function ErrorElement() {
- Sorry,
- {" "}
- {APP_NAME}
- {" "}
- has encountered an error
+ Sorry, {APP_NAME} has encountered an error
{message}
@@ -77,7 +74,11 @@ export function ErrorElement() {
>
Reset Local Database
-