From 62580ed07871606c88051b6a2007b865c636107e Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Mon, 19 Dec 2022 21:50:23 +0800 Subject: [PATCH] Fix "maximum call stack size exceeded" error (#5641) --- .changeset/itchy-laws-smile.md | 5 +++++ packages/astro/src/vite-plugin-head-propagation/index.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/itchy-laws-smile.md diff --git a/.changeset/itchy-laws-smile.md b/.changeset/itchy-laws-smile.md new file mode 100644 index 0000000000..e799a3fa57 --- /dev/null +++ b/.changeset/itchy-laws-smile.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix "Maximum call stack size exceeded" error in vite-plugin-head-propagation diff --git a/packages/astro/src/vite-plugin-head-propagation/index.ts b/packages/astro/src/vite-plugin-head-propagation/index.ts index 17b1c89484..ae8075e97e 100644 --- a/packages/astro/src/vite-plugin-head-propagation/index.ts +++ b/packages/astro/src/vite-plugin-head-propagation/index.ts @@ -27,6 +27,8 @@ export default function configHeadPropagationVitePlugin({ if (parent.id) { if (seen.has(parent.id)) { continue; + } else { + seen.add(parent.id); } const info = getInfo(parent.id); if (info?.meta.astro) {