Skip to content

Commit

Permalink
refactor: skip repeat checking
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Mar 30, 2023
1 parent af4880d commit 2b70d7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/compiler-sfc/src/compileScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,9 @@ export function compileScript(
const isDefineProps =
processDefineProps(init, decl.id) ||
processWithDefaults(init, decl.id, node.kind)
const isDefineEmits = processDefineEmits(init, decl.id)
processDefineSlots(init, decl.id)
const isDefineEmits =
!isDefineProps && processDefineEmits(init, decl.id)
!isDefineEmits && processDefineSlots(init, decl.id)

if (isDefineProps || isDefineEmits) {
if (left === 1) {
Expand Down
1 change: 0 additions & 1 deletion packages/dts-test/defineComponent.test-d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
SetupContext,
h,
SlotsType,
useSlots,
Slots
} from 'vue'
import { describe, expectType, IsUnion } from './utils'
Expand Down

0 comments on commit 2b70d7f

Please sign in to comment.