Skip to content

Commit 739d78b

Browse files
committed
fix: skip checking private properties of typeParameters
ref: vitejs/vite-plugin-vue@e4f5fff
1 parent f9c4ff9 commit 739d78b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/core/handleHotUpdate.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
254254
return prev === next
255255
}
256256

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

262261
for (const [i, prevNode] of prev.entries()) {
263262
const nextNode = next[i]
264263
if (
264+
// deep equal, but ignore start/end/loc/range/leadingComments/trailingComments/innerComments
265265
!deepEqual(prevNode, nextNode, [
266266
'start',
267267
'end',
@@ -270,6 +270,12 @@ function isEqualAst(prev?: t.Statement[], next?: t.Statement[]): boolean {
270270
'leadingComments',
271271
'trailingComments',
272272
'innerComments',
273+
// https://github.com/vuejs/core/issues/11923
274+
// avoid comparing the following properties of typeParameters
275+
// as it may be imported from 3rd lib and complex to compare
276+
'_ownerScope',
277+
'_resolvedReference',
278+
'_resolvedElements',
273279
])
274280
) {
275281
return false

0 commit comments

Comments
 (0)