0

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.

OlegTheCat
  • 4,443
  • 16
  • 24

1 Answers1

1

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

OlegTheCat
  • 4,443
  • 16
  • 24