From 555f7b817ebe70d7ebdc6f278461c8e91d20ba37 Mon Sep 17 00:00:00 2001 From: Cutsin Date: Tue, 11 Jul 2023 15:32:38 +0800 Subject: [PATCH 1/2] fix: Cannot read properties of undefined (reading 'scripts') at auditor --- packages/vite-plugin/src/node/plugin-htmlInlineScripts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite-plugin/src/node/plugin-htmlInlineScripts.ts b/packages/vite-plugin/src/node/plugin-htmlInlineScripts.ts index dd79ecdfd..45e462016 100644 --- a/packages/vite-plugin/src/node/plugin-htmlInlineScripts.ts +++ b/packages/vite-plugin/src/node/plugin-htmlInlineScripts.ts @@ -74,7 +74,7 @@ export const pluginHtmlInlineScripts: CrxPluginFn = () => { const key = toKey(ctx) const page = pages.get(key)! - page.scripts.push(...scripts) + page?.scripts.push(...scripts) pages.set(key, page) return html ? { html, tags: [...tags] } : [...tags] From 68eb10680190143e7f6de3f8d2d7c7ed95990495 Mon Sep 17 00:00:00 2001 From: Jack Steam Date: Sun, 14 Jan 2024 13:47:17 -0600 Subject: [PATCH 2/2] Create twenty-chairs-draw.md --- .changeset/twenty-chairs-draw.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twenty-chairs-draw.md diff --git a/.changeset/twenty-chairs-draw.md b/.changeset/twenty-chairs-draw.md new file mode 100644 index 000000000..1e744e14f --- /dev/null +++ b/.changeset/twenty-chairs-draw.md @@ -0,0 +1,5 @@ +--- +"@crxjs/vite-plugin": patch +--- + +fix: Cannot read properties of undefined (reading 'scripts') at auditor