Skip to content

Commit afd0bd7

Browse files
committed
fix: cast pending.buffer to ArrayBuffer for DataView and slice
1 parent a392e75 commit afd0bd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@ class RemoteExecutor implements QueryExecutor {
182182

183183
// Process complete frames
184184
while (pending.length >= 4) {
185-
const frameLen = new DataView(pending.buffer, pending.byteOffset).getUint32(0, true);
185+
const frameLen = new DataView(pending.buffer as ArrayBuffer, pending.byteOffset).getUint32(0, true);
186186
if (pending.length < 4 + frameLen) break; // wait for more data
187187

188-
const frameBuf = pending.buffer.slice(
188+
const frameBuf = (pending.buffer as ArrayBuffer).slice(
189189
pending.byteOffset + 4,
190190
pending.byteOffset + 4 + frameLen,
191191
);

0 commit comments

Comments
 (0)