fix: use container id when converting unresolved to jsvalue

This commit is contained in:
Zixuan Chen 2023-03-23 19:19:53 +08:00
parent 94f481e65e
commit 16e76eaf8e

View file

@ -351,17 +351,7 @@ pub mod wasm {
map.into_js_result().unwrap()
}
LoroValue::Unresolved(container_id) => {
let id = *container_id;
let map = Object::new();
js_sys::Reflect::set(
&map,
&JsValue::from_str("UnresolvedContainer"),
&JsValue::from(id),
)
.unwrap();
map.into_js_result().unwrap()
}
LoroValue::Unresolved(container_id) => JsValue::from(*container_id),
}
}