diff --git a/lib/legacy/class.html b/lib/legacy/class.html index a63c6a16a7..fc4206ced4 100644 --- a/lib/legacy/class.html +++ b/lib/legacy/class.html @@ -148,7 +148,7 @@ // get template first from any imperative set in `info._template` return info._template || // next look in dom-module associated with this element's is. - Polymer.DomModule.import(this.is, 'template') || + Polymer.DomModule && Polymer.DomModule.import(this.is, 'template') || // next look for superclass template (note: use superclass symbol // to ensure correct `this.is`) Base.template || diff --git a/lib/mixins/element-mixin.html b/lib/mixins/element-mixin.html index 9f2733d234..0599b82837 100644 --- a/lib/mixins/element-mixin.html +++ b/lib/mixins/element-mixin.html @@ -535,7 +535,7 @@ */ static get template() { if (!this.hasOwnProperty(JSCompiler_renameProperty('_template', this))) { - this._template = Polymer.DomModule.import(this.is, 'template') || + this._template = Polymer.DomModule && Polymer.DomModule.import(this.is, 'template') || // note: implemented so a subclass can retrieve the super // template; call the super impl this way so that `this` points // to the superclass. @@ -557,7 +557,7 @@ */ static get importPath() { if (!this.hasOwnProperty(JSCompiler_renameProperty('_importPath', this))) { - const module = Polymer.DomModule.import(this.is); + const module = Polymer.DomModule && Polymer.DomModule.import(this.is); this._importPath = module ? module.assetpath : '' || Object.getPrototypeOf(this.prototype).constructor.importPath; }