Skip to content

Commit

Permalink
fix: update file existence check to use object for prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
pylixonly committed Nov 23, 2024
1 parent 237de91 commit 85cbac7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/ui/hooks/useFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export enum CheckState {
export function useFileExists(path: string, prefix?: string): [CheckState, typeof fs] {
const [state, setState] = useState<CheckState>(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));

Expand Down

0 comments on commit 85cbac7

Please sign in to comment.