We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0358fdd commit 4f8c968Copy full SHA for 4f8c968
src/json-crdt-extensions/peritext/editor/Editor.ts
@@ -115,9 +115,9 @@ export class Editor<T = string> {
115
const str = this.txt.str;
116
return () => {
117
if (!chunk) return;
118
+ const span = chunk.span;
119
const offsetToReturn = offset;
120
const chunkToReturn = chunk;
- const span = chunk.span;
121
if (offset >= span) return;
122
offset++;
123
if (offset >= span) {
@@ -163,8 +163,6 @@ export class Editor<T = string> {
163
if (!chunk || offset < 0) return;
164
165
166
- const char = chunkToReturn.view().slice(offsetToReturn, offsetToReturn + 1);
167
- if (!char) return;
168
offset--;
169
if (offset < 0) {
170
chunk = str.prev(chunk);
0 commit comments