It appears that using a value of nil in the spread operator / dynamic props results in a runtime error as an attempt is made to index into the nil map.
A minimal reproduction is:
(let [x nil]
($ :div {& x}))
Seemingly, calling ($ :div {& nil}) doesn't trigger the issue.
It would be nice to gracefully handle this case as though an empty map were passed, in line with other behaviour throughout Clojure. For now this can be mitigated by constructing the component using the form:
It appears that using a value of
nil
in the spread operator / dynamic props results in a runtime error as an attempt is made to index into the nil map.A minimal reproduction is:
Seemingly, calling
($ :div {& nil})
doesn't trigger the issue.The exception is thrown on this line:
https://github.com/Lokeh/helix/blob/6fc96e4ac330daeb1cb3e8372a13819f67570661/src/helix/impl/props.cljc#L77
The error appears as so:
It would be nice to gracefully handle this case as though an empty map were passed, in line with other behaviour throughout Clojure. For now this can be mitigated by constructing the component using the form: