fix: last delay fallback (#468)

This commit is contained in:
ak 2023-12-03 22:09:29 +08:00 committed by GitHub
parent aa4d1d9e51
commit 0e3c46569a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,11 +84,15 @@ const setProxiesInfo = (
if (Array.isArray(extra)) { if (Array.isArray(extra)) {
const delay = extra.at(-1)?.delay const delay = extra.at(-1)?.delay
if (delay || !fallbackDefault) { if (delay) {
return delay return delay
} }
} }
if (!fallbackDefault) {
return undefined
}
return proxy.history?.at(-1)?.delay return proxy.history?.at(-1)?.delay
} }