Skip to content

Commit

Permalink
Convert CharPos to number in renderInterpreter.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinleroy committed Sep 26, 2023
1 parent 2ed6a15 commit 7d03ce4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -814,14 +814,14 @@ export function renderInterpreter(
) {
let root = ReactDOM.createRoot(container);
let marks = annotations?.state_locations || [];
let widgetRanges;
let widgetRanges: number[];
if (marks.length > 0) {
let [sortedMarks, filteredSteps] = filterSteps(view, trace.steps, marks);
widgetRanges = sortedMarks;
trace.steps = filteredSteps;
} else {
widgetRanges = trace.steps.map(
step => _.last(step.stack.frames)!.location.end
step => linecolToPosition(_.last(step.stack.frames)!.location.end, view.state.doc)
);
}

Expand Down

0 comments on commit 7d03ce4

Please sign in to comment.