Fix reading files from WebAssembly (#4183)

This commit is contained in:
Jonathan Tran
2024-10-18 10:43:01 -04:00
committed by GitHub
parent 5332ddd88e
commit 19ffa220e8
8 changed files with 115 additions and 9 deletions

View File

@ -18,7 +18,7 @@ class FileSystemManager {
return Promise.resolve(window.electron.path.join(dir, path))
}
async readFile(path: string): Promise<Uint8Array | void> {
async readFile(path: string): Promise<Uint8Array> {
// Using local file system only works from desktop.
if (!isDesktop()) {
return Promise.reject(