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

Prevent ngrams trees of depth > 10

parent 879330c8
...@@ -159,7 +159,10 @@ treeCpt = R2.hooksComponent thisModule "tree" cpt ...@@ -159,7 +159,10 @@ treeCpt = R2.hooksComponent thisModule "tree" cpt
forest = forest =
let depth = ngramsDepth.depth + 1 in let depth = ngramsDepth.depth + 1 in
H.ul {} <<< map (\ngrams -> tree (params { ngramsDepth = {depth, ngrams} })) <<< L.toUnfoldable if depth > 10 then
const $ H.text "ERROR DEPTH > 10"
else
H.ul {} <<< map (\ngrams -> tree (params { ngramsDepth = {depth, ngrams} })) <<< L.toUnfoldable
type RenderNgramsItem = type RenderNgramsItem =
......
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