diff options
Diffstat (limited to 'motus/js/motus.ml')
| -rw-r--r-- | motus/js/motus.ml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/motus/js/motus.ml b/motus/js/motus.ml index 47ea15c..c1ac754 100644 --- a/motus/js/motus.ml +++ b/motus/js/motus.ml @@ -77,9 +77,9 @@ let main length_id send_id dictionnary_id proposition_id rules_id table_id Elements.Transfert.get_content_from_url words |> E.map (fun html_response -> - State.App.dispatch - (module Initialize) - Initialize.{ length; html_response; sender; proposition })) + State.App.dispatch + (module Initialize) + Initialize.{ length; html_response; sender; proposition })) send_btn |> E.join in @@ -161,9 +161,10 @@ let main length_id send_id dictionnary_id proposition_id rules_id table_id S.map (fun ev -> match - (ev.State.current_prop, Motus_lib.Wordlist.list_size ev.State.analysis) + ( ev.State.current_prop + , Motus_lib.Wordlist.list_size ev.State.candidates ) with - | [], _ | _, 1 -> Some (Jstr.v "true") + | [], _ | _, 1 | _, 0 -> Some (Jstr.v "true") | _, _ -> None) ev in |
