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 {
4949 break ;
5050 case 'script' :
5151 const scriptBlock = createBlock ( node , source ) as SFCScriptBlock ;
52- const isSetup = ! ! scriptBlock . attrs . setup ;
52+ const isSetup = ! ! scriptBlock . setup ;
5353 if ( isSetup && ! descriptor . scriptSetup ) {
5454 descriptor . scriptSetup = scriptBlock ;
5555 break ;
@@ -129,8 +129,11 @@ function createBlock(node: ElementNode, source: string) {
129129 } ;
130130 }
131131 }
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 ] ;
134137 }
135138 }
136139 } ) ;
You can’t perform that action at this time.
0 commit comments