зеркало из https://github.com/mozilla/gecko-dev.git
Bug 701762 - DOMTemplate fails when returns undefined; r=dcamp
This commit is contained in:
Родитель
f6801cc272
Коммит
35d0ef028d
|
@ -343,7 +343,7 @@ Templater.prototype._toNode = function(thing, document) {
|
|||
* then _handleAsync() is just 'inserter(thing, siblingNode)'
|
||||
*/
|
||||
Templater.prototype._handleAsync = function(thing, siblingNode, inserter) {
|
||||
if (typeof thing.then === 'function') {
|
||||
if (thing != null && typeof thing.then === 'function') {
|
||||
// Placeholder element to be replaced once we have the real data
|
||||
var tempNode = siblingNode.ownerDocument.createElement('span');
|
||||
siblingNode.parentNode.insertBefore(tempNode, siblingNode);
|
||||
|
|
Загрузка…
Ссылка в новой задаче