File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
src/compiler/phases/2-analyze/visitors
tests/snapshot/samples/inline-module-vars/_expected/client Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -126,16 +126,11 @@ export function Identifier(node, context) {
126126 }
127127 }
128128
129- if ( ! can_inline && context . state . expression ) {
130- context . state . expression . can_inline = false ;
131- }
129+ if ( ! can_inline ) {
130+ if ( context . state . expression ) {
131+ context . state . expression . can_inline = false ;
132+ }
132133
133- /**
134- * if the identifier is part of an expression tag of an attribute we want to check if it's inlinable
135- * before marking the subtree as dynamic. This is because if it's inlinable it will be inlined in the template
136- * directly making the whole thing actually static.
137- */
138- if ( ! can_inline || ! context . path . find ( ( node ) => node . type === 'Attribute' ) ) {
139134 mark_subtree_dynamic ( context . path ) ;
140135 }
141136}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ var root = $.template(`<picture><source srcset="${__DECLARED_ASSET_0__}" type="i
1111
1212export default function Inline_module_vars ( $$anchor ) {
1313 var fragment = root ( ) ;
14- var p = $ . sibling ( $ . first_child ( fragment ) , 2 ) ;
1514
15+ $ . next ( 2 ) ;
1616 $ . append ( $$anchor , fragment ) ;
1717}
You can’t perform that action at this time.
0 commit comments