Don't insert blank text node into every tag (yet another IE8 issue)
Actually Mithril calls build() with data undefined for m("tag",{...}) [calls without third argument].
The changing undefined to "" causes build() insert a TextNode into current tag (on line 169).
But in IE8 it isn't allowed to insert a TextNode into any tag.
For example, m("input",{...}) fails here.
With this simple patch undefined is not chaged to "" anymore.
(And no empty TextNode's added to every mentioned tag.)
This commit is contained in:
parent
0ad9a7d57c
commit
459a38e8d9
1 changed files with 2 additions and 1 deletions
|
|
@ -29,7 +29,8 @@ Mithril = m = new function app(window) {
|
|||
return cell
|
||||
}
|
||||
function build(parentElement, parentTag, parentCache, parentIndex, data, cached, shouldReattach, index, editable, namespace, configs) {
|
||||
if (data === null || data === undefined) data = ""
|
||||
if (data === undefined) return undefined
|
||||
if (data === null) data = ""
|
||||
if (data.subtree === "retain") return cached
|
||||
|
||||
var cachedType = type.call(cached), dataType = type.call(data)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue