Merge branch 'next' of https://github.com/lhorie/mithril.js into patch-2
This commit is contained in:
commit
37266a2b8f
9 changed files with 30 additions and 25 deletions
|
|
@ -1,7 +1,7 @@
|
|||
(function (global, factory) {
|
||||
void (function (global, factory) { // eslint-disable-line
|
||||
"use strict"
|
||||
/* eslint-disable no-undef */
|
||||
var m = factory(window)
|
||||
var m = factory(typeof window !== "undefined" ? window : {})
|
||||
if (typeof module === "object" && module != null && module.exports) {
|
||||
module.exports = m
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
|
|
@ -510,7 +510,10 @@
|
|||
editable.innerHTML = data
|
||||
} else {
|
||||
// was a trusted string
|
||||
if (nodes[0].nodeType === 1 || nodes.length > 1) {
|
||||
if (nodes[0].nodeType === 1 ||
|
||||
nodes.length > 1 ||
|
||||
(nodes[0].nodeValue.trim && !nodes[0].nodeValue.trim())
|
||||
) {
|
||||
clear(cached.nodes, cached)
|
||||
nodes = [$document.createTextNode(data)]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue