r0man / sablono

Lisp/Hiccup style templating for Facebook's React in ClojureScript.
Eclipse Public License 1.0
696 stars 66 forks source link

Nested class sequences are not flattened #203

Open zlorf opened 5 years ago

zlorf commented 5 years ago

Recently we upgraded our dependencies, switching from sablono 0.7.1 to 0.8.6.

And because of 17ec99dec2355e34f4e87434a231262feb723bef, some our code stopped working.

That is because previously (join-classes ["a" ["x" ["y"]]]) returned "a x y" and now "a x [\"y\"]"

flatening happens only at the first level, what is problematic, when you have something like

(html [:div.a {:class [(if foo "x") (get-classes)]}])

where get-classes returns a dynamic list/vector.