File tree Expand file tree Collapse file tree 2 files changed +7
-21
lines changed
packages/svelte/src/compiler/phases
3-transform/client/visitors Expand file tree Collapse file tree 2 files changed +7
-21
lines changed Original file line number Diff line number Diff line change 66 * @param {Context } context
77 */
88export function Fragment ( node , context ) {
9- const parent = /** @type {AST.TemplateNode } */ ( context . path . at ( - 1 ) ) ;
10- // if (
11- // !parent ||
12- // parent.type === 'Component' ||
13- // parent.type === 'Root' ||
14- // parent.type === 'IfBlock' ||
15- // parent.type === 'KeyBlock' ||
16- // parent.type === 'EachBlock' ||
17- // parent.type === 'SnippetBlock' ||
18- // parent.type === 'AwaitBlock'
19- // ) {
20- const fragment_metadata = {
21- has_await : false ,
22- node
23- } ;
24- context . next ( { ...context . state , fragment : fragment_metadata } ) ;
25- node . metadata . has_await = fragment_metadata . has_await ;
26- // } else {
27- // context.next();
28- // }
9+ const fragment_metadata = {
10+ has_await : false ,
11+ node
12+ } ;
13+ context . next ( { ...context . state , fragment : fragment_metadata } ) ;
14+ node . metadata . has_await = fragment_metadata . has_await ;
2915}
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function SvelteBoundary(node, context) {
4343 // to resolve this we cheat: we duplicate const tags inside snippets
4444 for ( const child of node . fragment . nodes ) {
4545 if ( child . type === 'ConstTag' ) {
46- context . visit ( child , { ...context . state , init : const_tags } ) ;
46+ context . visit ( child , { ...context . state , consts : const_tags } ) ;
4747 }
4848 }
4949
You can’t perform that action at this time.
0 commit comments