Skip to content

Commit

Permalink
Bug fix in TypeScript translation (#26)
Browse files Browse the repository at this point in the history
This was converted from TS incorrectly, the TS is: if (!copy) copy =
marks.slice(0, i) and the docs for slice is:
![Screenshot 2024-09-27 at 3 05
38 PM](https://github.com/user-attachments/assets/54442bc9-93da-498b-a675-cd37db998a69)
  • Loading branch information
nlam-atlassian authored Sep 30, 2024
1 parent 2d9b2aa commit f6f3e5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class NodeType internal constructor(
var copy: MutableList<Mark>? = null
marks.forEachIndexed { i, mark ->
if (!this.allowsMarkType(mark.type)) {
if (copy == null) copy = marks.slice(0..i).toMutableList()
if (copy == null) copy = marks.slice(0..<i).toMutableList()
} else {
copy?.add(mark)
}
Expand Down

0 comments on commit f6f3e5b

Please sign in to comment.