prevent IE error #810

This commit is contained in:
Leo Horie 2015-11-12 23:30:50 -05:00
parent 04afc9a2c5
commit 28366212b0

View file

@ -510,7 +510,10 @@ void (function (global, factory) { // eslint-disable-line
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()
) {
clear(cached.nodes, cached)
nodes = [$document.createTextNode(data)]
}