Fixed err when .html and append use with null as input #670

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −1
Split
View
@@ -108,12 +108,13 @@ var Zepto = (function() {
// This function can be overriden in plugins for example to make
// it compatible with browsers that don't support the DOM fully.
zepto.fragment = function(html, name, properties) {
+ html+=''
if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>")
if (name === undefined) name = fragmentRE.test(html) && RegExp.$1
if (!(name in containers)) name = '*'
var nodes, dom, container = containers[name]
- container.innerHTML = '' + html
+ container.innerHTML = html
@AliMD

AliMD Jan 2, 2013

Contributor

and more describe about this line !

dom = $.each(slice.call(container.childNodes), function(){
container.removeChild(this)
})