Skip to content

Commit

Permalink
fix(classes): self not injecting in more than one class
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoS-ITA authored Apr 2, 2023
1 parent e70d604 commit 16e319b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/features/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -183,4 +184,4 @@ let ClassExtends = {
}
}

export {Class, ClassExtends}
export {Class, ClassExtends}

0 comments on commit 16e319b

Please sign in to comment.