File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33[ Squint] ( https://github.com/squint-cljs/squint ) : Light-weight ClojureScript dialect
44
5+ ## v0.9.176
6+
7+ - Fix rendering of ` null ` and ` undefined ` in ` #html `
8+
59## v0.9.175
610
711- [ #747 ] ( https://github.com/squint-cljs/squint/issues/747 ) : ` #html ` escape fix
Original file line number Diff line number Diff line change 22 "name" : " squint-cljs" ,
33 "type" : " module" ,
44 "sideEffects" : false ,
5- "version" : " 0.9.175 " ,
5+ "version" : " 0.9.176 " ,
66 "files" : [
77 " core.js" ,
88 " src/squint/core.js" ,
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function attr(v) {
6060}
6161
6262function toHTML ( v , unsafe ) {
63- if ( v == null ) return ;
63+ if ( v == null ) return '' ;
6464 if ( v instanceof Html ) return v ;
6565 if ( typeof ( v ) === 'string' ) return unsafe ? v : safe ( v ) ;
6666 if ( v [ Symbol . iterator ] ) {
Original file line number Diff line number Diff line change 4646(deftest html-nil-test
4747 (t/async done
4848 (let [js (squint.compiler/compile-string
49- " (let [p nil] #html [:div p])"
49+ " (let [p nil] #html [:div p js/undefined \" foo \" ])"
5050 {:repl true :elide-exports true :context :return })
5151 js (str/replace " (async function() { %s } )()" " %s" js)]
5252 (-> (js/eval js)
5353 (.then
54- #(is (html= " <div>undefined </div>" %)))
54+ #(is (html= " <div>foo </div>" %)))
5555 (.catch #(is false " nooooo" ))
5656 (.finally done)))))
5757
You can’t perform that action at this time.
0 commit comments