mirror of
https://github.com/jlengrand/webcomponentsjs.git
synced 2026-03-10 08:51:22 +00:00
Merge pull request #501 from kapouer/patch-1
fixClonedDom: return if source is not an element
This commit is contained in:
@@ -173,6 +173,8 @@
|
||||
// subtree and replace them with cloned <template>'s from source.
|
||||
// We must do this because only the source templates have proper .content.
|
||||
TemplateImpl.fixClonedDom = function(clone, source) {
|
||||
// do nothing if cloned node is not an element
|
||||
if (!source.querySelectorAll) return;
|
||||
// these two lists should be coincident
|
||||
var s$ = source.querySelectorAll(TEMPLATE_TAG);
|
||||
var t$ = clone.querySelectorAll(TEMPLATE_TAG);
|
||||
|
||||
Reference in New Issue
Block a user