Skip to content

Commit

Permalink
refactor: issue with undefined offset
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWoelki committed Jul 20, 2024
1 parent 79a466a commit d653560
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ function iterateSymbolsRanges(
)) {
const prettified = characterMap[symbol]?.transform ?? symbol;
addToRange(
from + offset,
from + offset + symbol.length,
from + (offset ?? 0),
from + (offset ?? 0) + symbol.length,
new SymbolsPosition(symbol, prettified),
);
}
Expand Down

0 comments on commit d653560

Please sign in to comment.