Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 3ea23df

Browse files
committed
Merge pull request #501 from kapouer/patch-1
fixClonedDom: return if source is not an element
2 parents d4f07e7 + 7d7fad8 commit 3ea23df

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Template/Template.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@
173173
// subtree and replace them with cloned <template>'s from source.
174174
// We must do this because only the source templates have proper .content.
175175
TemplateImpl.fixClonedDom = function(clone, source) {
176+
// do nothing if cloned node is not an element
177+
if (!source.querySelectorAll) return;
176178
// these two lists should be coincident
177179
var s$ = source.querySelectorAll(TEMPLATE_TAG);
178180
var t$ = clone.querySelectorAll(TEMPLATE_TAG);

0 commit comments

Comments
 (0)