From 68931297efaeb226fb0d5bcf96dd499d3acb8161 Mon Sep 17 00:00:00 2001 From: aaronmars Date: Tue, 7 May 2019 07:48:48 -0700 Subject: [PATCH] Select the parent of the script containing --- src/html-module-transform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/html-module-transform.ts b/src/html-module-transform.ts index ad2f331..fedd4c1 100644 --- a/src/html-module-transform.ts +++ b/src/html-module-transform.ts @@ -51,7 +51,7 @@ export const htmlModuleToJsModuleMap = if (property.type === 'Identifier') { memberExpression.replaceWith(ast`($documentModule.querySelector(${ - importMetaScriptElementSelector}))`); + importMetaScriptElementSelector}).parentElement)`); } }