Skip to content

Commit b5dd654

Browse files
committed
replace nodejs Buffer API with cross platform Uint8Array
1 parent 2039cf4 commit b5dd654

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class ScrapflyClient {
124124
}
125125

126126
if (format === 'blob') {
127-
content = Buffer.from(await response.arrayBuffer());
127+
content = new Uint8Array(await response.arrayBuffer());
128128
result.format = 'binary';
129129
}
130130

@@ -306,6 +306,7 @@ export class ScrapflyClient {
306306
}
307307

308308
const content = new Uint8Array(result.image);
309+
309310
// Use Deno's write file method
310311
await writeFile(file_path, content);
311312
}

0 commit comments

Comments
 (0)