Fix issue when copying an OO document without history

This commit is contained in:
yflory 2025-04-09 16:35:17 +02:00
parent 2d10fe591a
commit 967d43f4ff
2 changed files with 10 additions and 3 deletions

View File

@ -2378,10 +2378,17 @@ const factory = (ApiConfig = {}, Sortify, UserObject, ProxyManager,
var parsed = parse(msg);
if (parsed[1] !== txid) { console.log('bad txid'); return; }
if (parsed[0] === 'HISTORY_RANGE_ERROR') {
cb({
let err = parsed[2];
if (err?.code === 'ENOENT') {
completed = true;
return void cb({
messages: msgs,
isFull: true
});
}
return void cb({
error: parsed[2]
});
return;
}
if (parsed[0] === 'HISTORY_RANGE_END') {
cb({

File diff suppressed because one or more lines are too long