fix store type errors

This commit is contained in:
cqc
2024-03-29 20:19:31 -05:00
parent 78c1b61467
commit df15ad7efd
3 changed files with 14 additions and 20 deletions

View File

@ -107,15 +107,15 @@ let _ =
let textbox : 'a Js.t =
by_id_coerce "userinput" Dom_html.CoerceTo.textarea
in
let rootsync, rootstore = Store.test_pull () in
rootstore >>= fun rs ->
Store.test_pull () >>= fun (remote, s) ->
Store.S.tree s >>= fun root_tree ->
let workspace_store =
Store.S.Tree.find_tree rs [ ".config"; "workspace" ]
Store.S.Tree.find_tree root_tree [ ".config"; "workspace" ]
>>= function
| Some t -> Lwt.return t
| None -> Lwt.return (Store.S.Tree.empty ())
in
setup_storeview ~storeview:rootstore ~container ~textbox;
setup_storeview ~storeview:workspace_store ~container ~textbox;
Lwt.return
(Lwt.async (fun () ->
setup_workspace ~container workspace_store)))