From c7eb7c1984e2a85793ccb0c00020cf062066160c Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Fri, 12 Apr 2019 18:17:44 -0700 Subject: [PATCH] [ci skip] Add comment --- lib/utils/templatize.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/templatize.js b/lib/utils/templatize.js index 859c8a2f8c..7d4ed9dd3f 100644 --- a/lib/utils/templatize.js +++ b/lib/utils/templatize.js @@ -360,6 +360,9 @@ function createTemplatizerClass(template, templateInfo, options) { } /** + * Adds propagate effects from the template to the template instance for + * properties that the host binds to the template using the `_host_` prefix. + * * @suppress {missingProperties} class.prototype is not defined for some reason */ function addPropagateEffects(template, templateInfo, options) { @@ -423,6 +426,8 @@ function addNotifyEffects(klass, template, templateInfo, options) { } if (options.forwardHostProp && template.__dataHost) { for (let hprop in hostProps) { + // As we're iterating hostProps in this function, note whether + // there were any, for an optimization in addPropagateEffects if (!templateInfo.hasHostProps) { templateInfo.hasHostProps = true; }