Skip to content

Commit

Permalink
Use explicit error types to avoid VSCode.
Browse files Browse the repository at this point in the history
  • Loading branch information
retrixe committed Sep 20, 2021
1 parent 1f4a1d7 commit 42e7154
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions imports/dashboard/files/files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const Files = (props: {
let files: any
try {
files = await (await request(ip, `/server/${server}/files?path=${euc(path)}`)).json()
} catch (e) {
} catch (e: any) {
setMessage(e.message)
}
if (files.error === 'This server does not exist!') setServerExists(false)
Expand Down Expand Up @@ -142,7 +142,7 @@ const Files = (props: {
if (createFolder.success) fetchFiles()
else setMessage(createFolder.error)
setFetching(false)
} catch (e) {
} catch (e: any) {
setMessage(e.message)
setFetching(false)
}
Expand All @@ -166,7 +166,7 @@ const Files = (props: {
if (editFile.success) fetchFiles()
else setMessage(editFile.error)
setFetching(false)
} catch (e) {
} catch (e: any) {
setMessage(e.message)
setFetching(false)
}
Expand Down
2 changes: 1 addition & 1 deletion pages/servers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const Servers = () => {
})
if (res.status === 400) throw new Error()
else setRefetch(!refetch)
} catch (e) { setMessage(e) }
} catch (e: any) { setMessage(e) }
}

// Return final code.
Expand Down

0 comments on commit 42e7154

Please sign in to comment.