mirror of
https://github.com/foambubble/foam.git
synced 2026-01-10 06:28:12 -05:00
Fix issue when applying edits to last line
Authored by: @memeplex See also #860
This commit is contained in:
@@ -34,5 +34,5 @@ const getOffset = (
|
||||
offset = offset + lines[i].length + eolLen;
|
||||
i++;
|
||||
}
|
||||
return offset + Math.min(position.character, lines[i].length);
|
||||
return offset + Math.min(position.character, lines[i]?.length ?? 0);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user