Skip to content

Commit

Permalink
fix: skip checking private properties of typeParameters (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Sep 16, 2024
1 parent f51f7b7 commit e4f5fff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/plugin-vue/src/handleHotUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ 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
}
Expand All @@ -268,6 +267,7 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
const prevNode = prev[i]
const nextNode = next[i]
if (
// deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments
!deepEqual(prevNode, nextNode, [
'start',
'end',
Expand All @@ -276,6 +276,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 e4f5fff

Please sign in to comment.