From e636bc5bd0948a5fa078d59dc04379a45beecc12 Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 11 Nov 2024 12:08:52 +0700 Subject: [PATCH] fix: react-dropzone new version is broken --- electron/utils/migration.ts | 3 +++ web/package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/electron/utils/migration.ts b/electron/utils/migration.ts index 7295fa15d..80851f9de 100644 --- a/electron/utils/migration.ts +++ b/electron/utils/migration.ts @@ -61,6 +61,9 @@ async function checkAndMigrateTheme( ) if (existingTheme) { const desTheme = join(janDataThemesFolder, existingTheme) + if (!lstatSync(desTheme).isDirectory()) { + return + } console.debug('Updating theme', existingTheme) rmdirSync(desTheme, { recursive: true }) cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), { diff --git a/web/package.json b/web/package.json index af3bce5d1..d3ee82a33 100644 --- a/web/package.json +++ b/web/package.json @@ -38,7 +38,7 @@ "react": "18.2.0", "react-circular-progressbar": "^2.1.0", "react-dom": "18.2.0", - "react-dropzone": "^14.2.3", + "react-dropzone": "14.2.3", "react-hook-form": "^7.47.0", "react-hot-toast": "^2.4.1", "react-icons": "^4.12.0",