Commit 4d99ac79 authored by Nicolas Pouillard's avatar Nicolas Pouillard

Prevent ngrams trees of depth > 10

parent 879330c8
......@@ -159,6 +159,9 @@ treeCpt = R2.hooksComponent thisModule "tree" cpt
forest =
let depth = ngramsDepth.depth + 1 in
if depth > 10 then
const $ H.text "ERROR DEPTH > 10"
else
H.ul {} <<< map (\ngrams -> tree (params { ngramsDepth = {depth, ngrams} })) <<< L.toUnfoldable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment