fix(connection): keep narrowed attachment path type
This commit is contained in:
1 parent
285f0a7005
commit
2aac7c8ef5
1 file changed
+1
-1
@@ -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, {
|
||||
|
||||
Reference in new issue
Block a user