From 367273794d5a55411b6918b6d12e56f7fc9834e6 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Mon, 23 Jul 2018 10:18:50 -0700 Subject: [PATCH] Fix allowTemplateFromDomModule opt-in --- lib/mixins/element-mixin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index f11f5fd75f..4840331ce3 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -280,7 +280,9 @@ export const ElementMixin = dedupingMixin(base => { */ function getTemplateFromDomModule(is) { let template = null; - if (is && allowTemplateFromDomModule) { + // Under strictTemplatePolicy in 3.x+, dom-module lookup is only allowed + // when opted-in via allowTemplateFromDomModule + if (is && (!strictTemplatePolicy || allowTemplateFromDomModule)) { template = DomModule.import(is, 'template'); // Under strictTemplatePolicy, require any element with an `is` // specified to have a dom-module