Skip to content

Commit

Permalink
fix: skip checking private properties of typeParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Nov 26, 2024
1 parent f9c4ff9 commit 739d78b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/handleHotUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
return prev === next
}

// deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments
if (prev.length !== next.length) {
return false
}

for (const [i, prevNode] of prev.entries()) {
const nextNode = next[i]
if (
// deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments
!deepEqual(prevNode, nextNode, [
'start',
'end',
Expand All @@ -270,6 +270,12 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
'leadingComments',
'trailingComments',
'innerComments',
// https://github.com/vuejs/core/issues/11923
// avoid comparing the following properties of typeParameters
// as it may be imported from 3rd lib and complex to compare
'_ownerScope',
'_resolvedReference',
'_resolvedElements',
])
) {
return false
Expand Down

0 comments on commit 739d78b

Please sign in to comment.