fix: handle on new container correctly

when using diff calc for unknown span
This commit is contained in:
Zixuan Chen 2024-09-05 16:26:00 +08:00
parent e7bf12cc14
commit e9be422046
No known key found for this signature in database

View file

@ -756,6 +756,14 @@ impl DiffCalculatorTrait for ListDiffCalculator {
h.find_list_chunks_in(idx, IdSpan::new(id.peer, id.counter, target_end));
for c in chunks {
acc_len += c.length();
match &c.values {
Either::Left(_) => unreachable!(),
Either::Right(r) => {
if let LoroValue::Container(c) = r {
on_new_container(c)
}
}
}
delta = delta.insert(c);
}