Skip to content

Commit

Permalink
chore: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Jun 13, 2023
1 parent b01e079 commit 3896ddb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/compiler-sfc/src/script/resolveType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function mergeElements(
}
}
if (calls) {
;(res.calls || (res.calls = [])).push(...calls)
;(res.calls ||= []).push(...calls)
}
}
return res
Expand Down Expand Up @@ -341,11 +341,7 @@ function resolveInterfaceMembers(
}
}
if (calls) {
if (!base.calls) {
base.calls = calls
} else {
base.calls.push(...calls)
}
;(base.calls ||= []).push(...calls)
}
} catch (e) {
ctx.error(
Expand Down

0 comments on commit 3896ddb

Please sign in to comment.