How to make identity transformation in enlive?

72 views Asked by At

I need to replace content of an element based on some condition. If condition is not met the element should be untouched.

(enlive/deftemplate template (io/resource "templ.html")
  []
  [:#el_id] (if (condition)
              (enlive/content ...)
              ;; otherwise identity transformation here
              ))

I tried to use nil as identity transformation, but it just removes the element.

1

There are 1 answers

0
OlegTheCat On BEST ANSWER

identity function does the job. Sorry for messing you around.