fix: update file existence check to use object for prefix
This commit is contained in:
parent
237de91dce
commit
85cbac714a
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue