fix(connection): keep narrowed attachment path type

This commit is contained in:
Yudong authored and yudshj committed 2026-09-21 12:50:41 +08:00
1 parent 285f0a7005
commit 2aac7c8ef5
1 file changed
+1 -1
+1 -1
View File
@@ -124,7 +124,7 @@ async function parseBinaryResponse(response: Response): Promise<ReturnType<typeo
}
if (!Object.hasOwn(value, segment)) throw new TypeError('connection: invalid binary response path')
parent = value
key = segment as string | number
key = segment
}
if (Reflect.get(parent, key) !== null) throw new TypeError('connection: invalid binary response placeholder')
Object.defineProperty(parent, key, {