From 5b2b3338afbaa28b96ce50090b28b55639a1145a Mon Sep 17 00:00:00 2001 From: hywax Date: Thu, 28 Dec 2023 16:30:30 +0500 Subject: [PATCH 1/2] fix: recursive call with cross-references --- packages/plugin-vue/src/handleHotUpdate.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index 233c8d89..ce280832 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -212,6 +212,11 @@ function deepEqual(obj1: any, obj2: any, excludeProps: string[] = []): boolean { return obj1 === obj2 } + // Check if both equals object + if (obj1 === obj2) { + return true + } + // Get the keys of the objects const keys1 = Object.keys(obj1) const keys2 = Object.keys(obj2) From a6136278908654efcac0007a28459f980145b752 Mon Sep 17 00:00:00 2001 From: hywax Date: Sun, 31 Dec 2023 15:47:54 +0500 Subject: [PATCH 2/2] fix: change order check equals object --- packages/plugin-vue/src/handleHotUpdate.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/plugin-vue/src/handleHotUpdate.ts b/packages/plugin-vue/src/handleHotUpdate.ts index ce280832..06e64f5c 100644 --- a/packages/plugin-vue/src/handleHotUpdate.ts +++ b/packages/plugin-vue/src/handleHotUpdate.ts @@ -202,6 +202,11 @@ export function isOnlyTemplateChanged( } function deepEqual(obj1: any, obj2: any, excludeProps: string[] = []): boolean { + // Check if both equals object + if (obj1 === obj2) { + return true + } + // Check if both objects are of the same type if (typeof obj1 !== typeof obj2) { return false @@ -212,11 +217,6 @@ function deepEqual(obj1: any, obj2: any, excludeProps: string[] = []): boolean { return obj1 === obj2 } - // Check if both equals object - if (obj1 === obj2) { - return true - } - // Get the keys of the objects const keys1 = Object.keys(obj1) const keys2 = Object.keys(obj2)