fix: cache lookup error when doing loopback calls

This commit is contained in:
Julian Lam
2025-08-13 10:00:39 -04:00
parent 8c6992f525
commit 673896390f

View File

@@ -48,7 +48,7 @@ async function init() {
*/
function lookup(hostname, options, callback) {
let { ok, lookup } = checkCache.get(hostname);
lookup = [...lookup];
lookup = lookup && [...lookup];
if (!ok) {
throw new Error('lookup-failed');
}