diff --git a/lib/utils/templatize.js b/lib/utils/templatize.js index 7cdcb8ca4a..859c8a2f8c 100644 --- a/lib/utils/templatize.js +++ b/lib/utils/templatize.js @@ -364,11 +364,7 @@ function createTemplatizerClass(template, templateInfo, options) { */ function addPropagateEffects(template, templateInfo, options) { let userForwardHostProp = options.forwardHostProp; - const hasHostProps = templateInfo.hasHostProps || - (templateInfo.hasHostProps = - Boolean(templateInfo.hostProps && - Object.keys(templateInfo.hostProps).length)); - if (userForwardHostProp && hasHostProps) { + if (userForwardHostProp && templateInfo.hasHostProps) { // Provide data API and property effects on memoized template class let klass = templateInfo.templatizeTemplateClass; if (!klass) { @@ -427,6 +423,9 @@ function addNotifyEffects(klass, template, templateInfo, options) { } if (options.forwardHostProp && template.__dataHost) { for (let hprop in hostProps) { + if (!templateInfo.hasHostProps) { + templateInfo.hasHostProps = true; + } klass.prototype._addPropertyEffect(hprop, klass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY, {fn: createNotifyHostPropEffect()});