From 16e319b436c3e46c1b2d353c008de00ed72569e5 Mon Sep 17 00:00:00 2001 From: "Xenos.exe" <55803068+XenoS-ITA@users.noreply.github.com> Date: Sun, 2 Apr 2023 17:01:54 +0200 Subject: [PATCH] fix(classes): self not injecting in more than one class --- src/features/classes.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/features/classes.js b/src/features/classes.js index dd128f9..8089956 100644 --- a/src/features/classes.js +++ b/src/features/classes.js @@ -16,9 +16,10 @@ function classIterator(fileData, matchIndices) { .then(")") let lines; - + + let originalFileData = fileData for (let i of matchIndices) { - let slicedFile = fileData.slice(i); + let slicedFile = originalFileData.slice(i); [_, startLine, endLine] = ReplaceFunctionEnding(fileData, slicedFile, null) let classBody = sliceLine(fileData, startLine, endLine + 1) @@ -183,4 +184,4 @@ let ClassExtends = { } } -export {Class, ClassExtends} \ No newline at end of file +export {Class, ClassExtends}