fix: list assert err

This commit is contained in:
Zixuan Chen 2022-11-24 01:13:36 +08:00
parent 9bdb6b9fd4
commit c798662dd1

View file

@ -95,10 +95,6 @@ impl ListContainer {
} }
fn insert_value<C: Context>(&mut self, ctx: &C, pos: usize, value: LoroValue) -> Option<ID> { fn insert_value<C: Context>(&mut self, ctx: &C, pos: usize, value: LoroValue) -> Option<ID> {
assert!(
value.as_unresolved().is_none(),
"To insert a container to list, you should use insert_obj method or insert a prelim type to the list"
);
let store = ctx.log_store(); let store = ctx.log_store();
let mut store = store.write().unwrap(); let mut store = store.write().unwrap();
let id = store.next_id(); let id = store.next_id();