mirror of
https://git.sync.wtf/troed/oc-ls-stats.git
synced 2026-10-10 12:38:22 +03:00
fix: dedupe discovered server URLs
This commit is contained in:
1 parent
1b966f2bde
commit
1748c93cc4
2 files changed
+10
-2
No files matched your search
+2
-2
@@ -271,9 +271,9 @@ export function resolveServerUrls(options: unknown, providers: unknown, config:
|
||||
if (server !== undefined) {
|
||||
console.warn("[oc-ls-stats] ignoring invalid 'server' plugin option, falling back to provider detection")
|
||||
}
|
||||
const detected = extractProviderUrlsFromList(providers)
|
||||
const detected = [...new Set(extractProviderUrlsFromList(providers))]
|
||||
if (detected.length > 0) return detected
|
||||
const legacy = extractProviderUrls(config)
|
||||
const legacy = [...new Set(extractProviderUrls(config))]
|
||||
return legacy.length > 0 ? legacy : ["http://localhost:8080"]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user