diff --git a/mithril.js b/mithril.js index 34f77cb8..9de1bf21 100644 --- a/mithril.js +++ b/mithril.js @@ -73,6 +73,7 @@ function hyperscript(selector) { return Vnode(selector, attrs && attrs.key, attrs || {}, Vnode.normalizeChildren(children), undefined, undefined) } hyperscript.trust = function(html) { + if (html == null) html = "" return Vnode("<", undefined, undefined, html, undefined, undefined) } hyperscript.fragment = function(attrs1, children) { diff --git a/mithril.min.js b/mithril.min.js index 955fc913..c101f8cd 100644 --- a/mithril.min.js +++ b/mithril.min.js @@ -1,10 +1,10 @@ new function(){function y(b,f,p,g,k,h){return{tag:b,key:f,attrs:p,children:g,text:k,dom:h,domSize:void 0,state:{},events:void 0,instance:void 0,skip:!1}}function A(b){if(null==b||"string"!==typeof b&&null==b.view)throw Error("The selector must be either a string or a component.");if("string"===typeof b&&void 0===J[b]){for(var f,p,g=[],k={};f=Q.exec(b);){var h=f[1],w=f[2];""===h&&""!==w?p=w:"#"===h?k.id=w:"."===h?g.push(w):"["===f[3][0]&&((h=f[6])&&(h=h.replace(/\\(["'])/g,"$1").replace(/\\\\/g,"\\")), k[f[4]]=h||!0)}0d.filter(G).length)throw Error("Ensure that each item passed to m.prop.combine/m.prop.merge is a stream"); return v(f(),d,function(){var e=d.filter(B);if(0