fixes counting tags to be closed when a component can't be rendered (#490)

This commit is contained in:
ewatch 2021-06-18 00:19:21 +02:00 committed by GitHub
parent ff7ec2fc02
commit 2b51e9e4b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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