From 9e106d822910f2b4eb4cda1e176a6265fee6a8e9 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 3 Sep 2019 15:16:38 -0700 Subject: [PATCH] Add runtime stamping tests around linking & unlinking effects. --- lib/mixins/property-effects.js | 3 +- test/unit/property-effects-template.html | 103 +++++++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index c8d2003e72..50abd2a2c5 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2866,7 +2866,7 @@ export const PropertyEffects = dedupingMixin(superClass => { // parent list, a template's `parent` reference is never removed, since // this is is determined by the tree structure and applied at // `applyTemplateInfo` time. - let templateInfo = dom.templateInfo; + const templateInfo = dom.templateInfo; const {previousSibling, nextSibling, parent} = templateInfo; if (previousSibling) { previousSibling.nextSibling = nextSibling; @@ -2878,6 +2878,7 @@ export const PropertyEffects = dedupingMixin(superClass => { } else if (parent) { parent.lastChild = previousSibling; } + templateInfo.nextSibling = templateInfo.previousSibling = null; // Remove stamped nodes let nodes = templateInfo.childNodes; for (let i=0; i + +