File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/language-core/lib/utils Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export function parse(source: string): SFCParseResult {
49
49
break ;
50
50
case 'script' :
51
51
const scriptBlock = createBlock ( node , source ) as SFCScriptBlock ;
52
- const isSetup = ! ! scriptBlock . attrs . setup ;
52
+ const isSetup = ! ! scriptBlock . setup ;
53
53
if ( isSetup && ! descriptor . scriptSetup ) {
54
54
descriptor . scriptSetup = scriptBlock ;
55
55
break ;
@@ -129,8 +129,11 @@ function createBlock(node: ElementNode, source: string) {
129
129
} ;
130
130
}
131
131
}
132
- else if ( type === 'script' && p . name === 'setup' ) {
133
- block . setup = attrs . setup ;
132
+ else if (
133
+ type === 'script'
134
+ && ( p . name === 'setup' || p . name === 'vapor' )
135
+ ) {
136
+ block . setup = attrs [ p . name ] ;
134
137
}
135
138
}
136
139
} ) ;
You can’t perform that action at this time.
0 commit comments