Skip to content

Commit

Permalink
Improve compatibility with other versions or other Realms
Browse files Browse the repository at this point in the history
  • Loading branch information
petamoriken committed Oct 29, 2021
1 parent 0aa5488 commit 6465d5a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Float16Array.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ function getFloat16BitsArray(float16) {
}

// from another Float16Array instance (a different version?)
const cloned = new Float16Array(
const cloned = ReflectConstruct(Float16Array, [
// @ts-ignore
float16.buffer,
// @ts-ignore
float16.byteOffset,
// @ts-ignore
float16.length
);
float16.length,
], float16.constructor);
return WeakMapPrototypeGet(targets, cloned);
}

Expand Down

0 comments on commit 6465d5a

Please sign in to comment.