Skip to content

Commit 3c2a3c3

Browse files
committed
stream: use Float16Array from primordials
Use the Float16Array constructor captured during Node.js initialization instead of reading it from globalThis when the adapter is loaded. This prevents changes to the global constructor from affecting chunk cloning. Signed-off-by: seungwoo <zoozoo1302@gmail.com>
1 parent 062b9a0 commit 3c2a3c3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎lib/internal/webstreams/adapters.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const {
66
BigInt64Array,
77
BigUint64Array,
88
DataView,
9+
Float16Array,
910
Float32Array,
1011
Float64Array,
1112
FunctionPrototypeCall,
@@ -31,9 +32,6 @@ const {
3132
Uint32Array,
3233
Uint8Array,
3334
Uint8ClampedArray,
34-
globalThis: {
35-
Float16Array,
36-
},
3735
} = primordials;
3836

3937
const { TextEncoder } = require('internal/encoding');

0 commit comments

Comments
 (0)