Skip to content

Commit c7eb7c1

Browse files
committed
[ci skip] Add comment
1 parent f1a9d4f commit c7eb7c1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/utils/templatize.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ function createTemplatizerClass(template, templateInfo, options) {
360360
}
361361

362362
/**
363+
* Adds propagate effects from the template to the template instance for
364+
* properties that the host binds to the template using the `_host_` prefix.
365+
*
363366
* @suppress {missingProperties} class.prototype is not defined for some reason
364367
*/
365368
function addPropagateEffects(template, templateInfo, options) {
@@ -423,6 +426,8 @@ function addNotifyEffects(klass, template, templateInfo, options) {
423426
}
424427
if (options.forwardHostProp && template.__dataHost) {
425428
for (let hprop in hostProps) {
429+
// As we're iterating hostProps in this function, note whether
430+
// there were any, for an optimization in addPropagateEffects
426431
if (!templateInfo.hasHostProps) {
427432
templateInfo.hasHostProps = true;
428433
}

0 commit comments

Comments
 (0)