From c3866a591b338e75c996b47a8364b0539a272cc0 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Mon, 5 Jun 2017 17:54:06 -0700 Subject: [PATCH] guard all dommodule references --- lib/legacy/class.html | 2 +- lib/mixins/element-mixin.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; }