Skip to content

Commit b552939

Browse files
authored
Merge pull request #954 from yannip1234/master
Fix issue with copying class file overwriting inheritance
2 parents 14ded9b + 3d28684 commit b552939

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export function generateFileContent(fileName: string, sourceContent: Buffer): {
2828
while (sourceLines.length > 0) {
2929
const nextLine = sourceLines.shift();
3030
if (nextLine.startsWith("Class ")) {
31-
content.push(...preamble, `Class ${className}`, ...sourceLines);
31+
const classLine = nextLine.split(" ");
32+
classLine[1] = className;
33+
content.push(...preamble, classLine.join(" "), ...sourceLines);
3234
break;
3335
}
3436
preamble.push(nextLine);

0 commit comments

Comments
 (0)