From 85cbac714a40d4afc273e9d710608c9094942412 Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:32:12 +0800 Subject: [PATCH] fix: update file existence check to use object for prefix --- src/core/ui/hooks/useFS.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ui/hooks/useFS.ts b/src/core/ui/hooks/useFS.ts index 3577450..6de18c3 100644 --- a/src/core/ui/hooks/useFS.ts +++ b/src/core/ui/hooks/useFS.ts @@ -11,7 +11,7 @@ export enum CheckState { export function useFileExists(path: string, prefix?: string): [CheckState, typeof fs] { const [state, setState] = useState(CheckState.LOADING); - const check = () => fs.fileExists(path, prefix) + const check = () => fs.fileExists(path, { prefix }) .then(exists => setState(exists ? CheckState.TRUE : CheckState.FALSE)) .catch(() => setState(CheckState.ERROR));