Prismatic/dommy — pull request #14 by walterrw (2013-02-27 11:49:52+00:00)
Title: Fix exception thrown when calling a template: Cannot create node from ""

It seems that by passing an empty string to a template defined by deftemplate, the node (in this case a textnode) cannot be created and an exception is thrown, because the protocol function -elem is not defined for the type string.

The reason for this might be that the protocol is implemented for the type js/String, which does not match empty strings. A similar issue is discussed here http://dev.clojure.org/jira/browse/CLJS-347.

I added a failing test to reproduce the problem and a fix in template.cljs. I think this should fix the issue, but I'm not sure if there's other aspects that need to be considered.