From 2b51e9e4b33ad75d4b583dda178bfbf56a080524 Mon Sep 17 00:00:00 2001 From: ewatch Date: Fri, 18 Jun 2021 00:19:21 +0200 Subject: [PATCH] fixes counting tags to be closed when a component can't be rendered (#490) --- packages/astro/src/compiler/codegen/index.ts | 1 + 1 file changed, 1 insertion(+) 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