diff --git a/packages/astro/src/compiler/codegen/index.ts b/packages/astro/src/compiler/codegen/index.ts index be0e1d17c..188029a2d 100644 --- a/packages/astro/src/compiler/codegen/index.ts +++ b/packages/astro/src/compiler/codegen/index.ts @@ -609,6 +609,7 @@ async function compileHtml(enterNode: TemplateNode, state: CodegenState, compile paren++; buffers[curr] += `h(${wrapper}, ${attributes ? generateAttributes(attributes) : 'null'}`; } catch (err) { + paren--; // handle errors in scope with filename const rel = filename.replace(astroConfig.projectRoot.pathname, ''); // TODO: return actual codeframe here