Fix conversion of OpId to ExId when referring to root object
This commit is contained in:
parent
94ff10f690
commit
145969152a
1 changed files with 5 additions and 1 deletions
|
@ -344,7 +344,11 @@ impl Automerge {
|
|||
}
|
||||
|
||||
pub(crate) fn id_to_exid(&self, id: OpId) -> ExId {
|
||||
ExId::Id(id.0, self.ops.m.actors.cache[id.1].clone(), id.1)
|
||||
if id == types::ROOT {
|
||||
ExId::Root
|
||||
} else {
|
||||
ExId::Id(id.0, self.ops.m.actors.cache[id.1].clone(), id.1)
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the string represented by the given text object.
|
||||
|
|
Loading…
Add table
Reference in a new issue