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

@ -109,7 +109,9 @@ export const fileLoader: LoaderFunction = async (
)
}
code = await window.electron.readFile(currentFilePath)
code = await window.electron.readFile(currentFilePath, {
encoding: 'utf-8',
})
code = normalizeLineEndings(code)
// Update both the state and the editor's code.