From cf6b61fe96819789e9253879c4f50bcfce73c577 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Thu, 4 Jul 2024 11:29:46 +0200 Subject: [PATCH] fix change detection --- frontend/src/plugins/utils.ts | 4 ++-- frontend/src/views/Inbounds.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/plugins/utils.ts b/frontend/src/plugins/utils.ts index 72f90e73..63f79c1d 100644 --- a/frontend/src/plugins/utils.ts +++ b/frontend/src/plugins/utils.ts @@ -76,8 +76,8 @@ export const FindDiff = { // Check if both objects are plain objects if (typeof obj1 === 'object' && typeof obj2 === 'object' && obj1 !== null && obj2 !== null) { - const keys1 = Object.keys(obj1) - const keys2 = Object.keys(obj2) + const keys1 = Object.keys(obj1).filter(key => obj1[key] !== undefined) + const keys2 = Object.keys(obj2).filter(key => obj2[key] !== undefined) if (keys1.length !== keys2.length) { return false diff --git a/frontend/src/views/Inbounds.vue b/frontend/src/views/Inbounds.vue index 01b4b64c..26fa9715 100644 --- a/frontend/src/views/Inbounds.vue +++ b/frontend/src/views/Inbounds.vue @@ -242,6 +242,7 @@ const saveModal = (data:Inbound, stats: boolean, tls_id: number, cData: any) => // Update tls preset if (tls_id>0) { tlsConfigs.value.findLast(t => t.id == tls_id).inbounds.push(data.tag) + tlsConfigs.value.sort() } if (Object.hasOwn(data,'users')) {