fix change detection

This commit is contained in:
Alireza Ahmadi
2024-07-04 11:29:46 +02:00
parent e1aaa3d748
commit cf6b61fe96
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -76,8 +76,8 @@ export const FindDiff = {
// Check if both objects are plain objects // Check if both objects are plain objects
if (typeof obj1 === 'object' && typeof obj2 === 'object' && obj1 !== null && obj2 !== null) { if (typeof obj1 === 'object' && typeof obj2 === 'object' && obj1 !== null && obj2 !== null) {
const keys1 = Object.keys(obj1) const keys1 = Object.keys(obj1).filter(key => obj1[key] !== undefined)
const keys2 = Object.keys(obj2) const keys2 = Object.keys(obj2).filter(key => obj2[key] !== undefined)
if (keys1.length !== keys2.length) { if (keys1.length !== keys2.length) {
return false return false
+1
View File
@@ -242,6 +242,7 @@ const saveModal = (data:Inbound, stats: boolean, tls_id: number, cData: any) =>
// Update tls preset // Update tls preset
if (tls_id>0) { if (tls_id>0) {
tlsConfigs.value.findLast(t => t.id == tls_id).inbounds.push(data.tag) tlsConfigs.value.findLast(t => t.id == tls_id).inbounds.push(data.tag)
tlsConfigs.value.sort()
} }
if (Object.hasOwn(data,'users')) { if (Object.hasOwn(data,'users')) {