diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index a8bce1fbff..5988b2df8c 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -2801,8 +2801,16 @@ export const PropertyEffects = dedupingMixin(superClass => { dom.templateInfo = templateInfo; // Setup compound storage, 2-way listeners, and dataHost for bindings setupBindings(this, templateInfo); - // Flush properties into template nodes if already booted - if (this.__dataReady) { + // Flush properties into template nodes; the check on `__dataClientsReady` + // ensures we don't needlessly run effects for an element's initial + // prototypical template stamping since they will happen as a part of the + // first call to `_propertiesChanged`. This flag is set to true + // after running the initial propagate effects, and immediately before + // flushing clients. Since downstream clients could cause stamping on + // this host (e.g. a fastDomIf `dom-if` being forced to render + // synchronously), this flag ensures effects for runtime-stamped templates + // are run at this point during the initial element boot-up. + if (this.__dataClientsReady) { this._runEffectsForTemplate(templateInfo, this.__data, null, false); } return dom;