You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The find predicate is wrong: const chunk = this._chunks.find((c) => c.offset < index && c.offset + c.length >= index);
When reading index 0, no chunk is found, since the first chunk has offset 0, which is equal to the index. Thus, the lower check has to be changed to <=. Accordingly, the upper check has to be changed to >, as offset + length is already outside the chunk.
The text was updated successfully, but these errors were encountered:
The find predicate is wrong:
const chunk = this._chunks.find((c) => c.offset < index && c.offset + c.length >= index);
When reading index 0, no chunk is found, since the first chunk has offset 0, which is equal to the index. Thus, the lower check has to be changed to
<=
. Accordingly, the upper check has to be changed to>
, asoffset + length
is already outside the chunk.The text was updated successfully, but these errors were encountered: