Add comment and handle undefined host case.

This commit is contained in:
Kevin Schaaf
2018-10-31 14:18:22 -07:00
parent 9f65049f76
commit 6e4f62d88b
+3 -1
View File
@@ -155,10 +155,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
Polymer.LegacyDataMixin(superClass)
);
// Apply LegacyDataMixin to Templatizer instances as well, and defer
// runtime switch to the root's host (_methodHost)
Polymer.Templatize.mixin =
Polymer.dedupingMixin(superClass => class extends Polymer.LegacyDataMixin(superClass) {
get _legacyUndefinedCheck() {
return this._methodHost._legacyUndefinedCheck;
return this._methodHost && this._methodHost._legacyUndefinedCheck;
}
});