From 0829116fc13e60dd955211c8d4b784ef0df78152 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 19 Feb 2024 10:32:43 +0100 Subject: [PATCH] adapting family protection in dns --- web/html/xui/xray.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/html/xui/xray.html b/web/html/xui/xray.html index 02ee0bbf..bea688ed 100644 --- a/web/html/xui/xray.html +++ b/web/html/xui/xray.html @@ -1291,14 +1291,14 @@ familyProtectSettings: { get: function () { if (!this.templateSettings || !this.templateSettings.dns || !this.templateSettings.dns.servers) return false; - return doAllItemsExist(this.templateSettings.dns.servers, this.settingsData.familyProtectDNS.servers); + return doAllItemsExist(this.settingsData.familyProtectDNS.servers, this.templateSettings.dns.servers); }, set: function (newValue) { newTemplateSettings = this.templateSettings; if (newValue) { newTemplateSettings.dns = this.settingsData.familyProtectDNS; } else { - newTemplateSettings.dns?.servers?.filter(data => !this.settingsData.familyProtectDNS.servers.includes(data)) + newTemplateSettings.dns.servers = newTemplateSettings.dns?.servers?.filter(data => !this.settingsData.familyProtectDNS.servers.includes(data)) } this.templateSettings = newTemplateSettings; },