From 1d1078dae1d12b7e35f61654a7267d37d881604e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 26 Sep 2026 01:57:55 -0700 Subject: [PATCH] Fix buffer handling. --- src/lib/primordials.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/primordials.ts b/src/lib/primordials.ts index 8bc4393..4849056 100644 --- a/src/lib/primordials.ts +++ b/src/lib/primordials.ts @@ -128,7 +128,7 @@ export function isBytes (a: unknown): a is Bytes { /** Captured version of `DataView` reusing input offset and length. */ export function view (bytes: Bytes): View { - return new View(getBuffer.call(bytes), getByteOffset.call(bytes), getByteLength.call(bytes)) + return new View(getBuffer.call(bytes) as ArrayBuffer, getByteOffset.call(bytes), getByteLength.call(bytes)) } /** @@ -147,7 +147,7 @@ export function words (bytes: Bytes): Words { if (offset !== 0) { throw new Nano25519RangeError('Unexpected byte offset', { cause: offset }) } - return new Words(bytes.buffer, 0, getByteLength.call(bytes) >> 2) + return new Words(getBuffer.call(bytes) as ArrayBuffer, 0, getByteLength.call(bytes) >> 2) } const LOWER = '0123456789abcdef' -- 2.52.0