fix: Remove duplicate domains in the domain list initialization (#10260)

This commit is contained in:
KOMATA 2025-09-04 15:20:38 +08:00 committed by GitHub
parent d9e7c8d880
commit ac4962cf19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -172,6 +172,7 @@ const updateDomainsString = () => {
const initDomainList = (domainsStr: string) => {
if (domainsStr) {
domainList.value = domainsStr.split('\n').filter((domain) => domain.trim() !== '');
domainList.value = Array.from(new Set(domainList.value));
if (domainList.value.length === 0) {
domainList.value = [''];
}