Skip to content

Commit 9a15c3f

Browse files
Fix new class creation, broken in 2.10.4 (#1266)
1 parent 44e3575 commit 9a15c3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function generateFileContent(
2727
fileName: string,
2828
sourceContent: Buffer
2929
): { content: string[]; enc: boolean } {
30-
const sourceLines = new TextDecoder().decode(sourceContent).split("\n");
30+
const sourceLines = sourceContent.length ? new TextDecoder().decode(sourceContent).split("\n") : [];
3131
const fileExt = fileName.split(".").pop().toLowerCase();
3232
const csp = fileName.startsWith("/");
3333
if (fileExt === "cls" && !csp) {

0 commit comments

Comments
 (0)