Skip to content

Commit e7b81c1

Browse files
committed
fix(macros): add placeholder after removed params
1 parent 341d18c commit e7b81c1

File tree

1 file changed

+5
-1
lines changed
  • packages/macros/src/core/define-component

1 file changed

+5
-1
lines changed

packages/macros/src/core/define-component/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ export function transformDefineComponent(
5353
s.overwrite(
5454
root.params[0].start!,
5555
root.params[0].end!,
56-
root.params.length > 1 ? `${HELPER_PREFIX}props` : '',
56+
root.params.length > 1
57+
? `${HELPER_PREFIX}props`
58+
: root.start === root.params[0].start!
59+
? '()'
60+
: '',
5761
)
5862
} else if (root.params[0].type === 'ObjectPattern') {
5963
const restructuredProps = root.params[0]

0 commit comments

Comments
 (0)