Skip to content

Commit 4505a8f

Browse files
committed
fix: type
1 parent 5de8dda commit 4505a8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/language-core/lib/codegen/template/elementProps.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function* generateElementProps(
144144
options,
145145
ctx,
146146
prop,
147+
prop.exp,
147148
ctx.codeFeatures.all,
148149
prop.arg?.loc.start.offset === prop.exp?.loc.start.offset,
149150
enableCodeFeatures
@@ -267,11 +268,11 @@ function* genereatePropExp(
267268
options: TemplateCodegenOptions,
268269
ctx: TemplateCodegenContext,
269270
prop: CompilerDOM.DirectiveNode,
271+
exp: CompilerDOM.SimpleExpressionNode | undefined,
270272
features: VueCodeInformation,
271273
isShorthand: boolean,
272274
enableCodeFeatures: boolean
273275
): Generator<Code> {
274-
const exp = prop.exp as CompilerDOM.SimpleExpressionNode;
275276
if (exp && exp.constType !== CompilerDOM.ConstantTypes.CAN_STRINGIFY) { // style='z-index: 2' will compile to {'z-index':'2'}
276277
if (!isShorthand) { // vue 3.4+
277278
yield* generateInterpolation(

0 commit comments

Comments
 (0)