We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44e3575 commit 9a15c3fCopy full SHA for 9a15c3f
src/providers/FileSystemProvider/FileSystemProvider.ts
@@ -27,7 +27,7 @@ export function generateFileContent(
27
fileName: string,
28
sourceContent: Buffer
29
): { content: string[]; enc: boolean } {
30
- const sourceLines = new TextDecoder().decode(sourceContent).split("\n");
+ const sourceLines = sourceContent.length ? new TextDecoder().decode(sourceContent).split("\n") : [];
31
const fileExt = fileName.split(".").pop().toLowerCase();
32
const csp = fileName.startsWith("/");
33
if (fileExt === "cls" && !csp) {
0 commit comments