From d40f7d2676b8558de14e6997d564328a10108e07 Mon Sep 17 00:00:00 2001 From: Reese Wright Date: Mon, 2 Feb 2026 14:54:05 +0000 Subject: [PATCH] refactor: improve path resolution readability --- tauri/src/platform/filesystem.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tauri/src/platform/filesystem.ts b/tauri/src/platform/filesystem.ts index fc5083b9..2292a99a 100644 --- a/tauri/src/platform/filesystem.ts +++ b/tauri/src/platform/filesystem.ts @@ -10,12 +10,12 @@ export const tauriFilesystem: PlatformFilesystem = { }); if (filePath) { - const resolvedPath = - typeof filePath === 'string' - ? filePath - : filePath && typeof filePath === 'object' && 'path' in filePath - ? (filePath as { path: string }).path - : ''; + let resolvedPath = ''; + if (typeof filePath === 'string') { + resolvedPath = filePath; + } else if (filePath && typeof filePath === 'object' && 'path' in filePath) { + resolvedPath = (filePath as { path: string }).path; + } if (!resolvedPath) { throw new Error('Failed to resolve save path');