fix(client): wrong usage of Buffer (#37)

This commit is contained in:
Daniel Rochetti 2023-12-14 09:19:06 -08:00 committed by GitHub
parent e5cfd8ee38
commit 6a89dd1ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@fal-ai/serverless-client",
"description": "The fal serverless JS/TS client",
"version": "0.7.1",
"version": "0.7.2",
"license": "MIT",
"repository": {
"type": "git",

View File

@ -271,7 +271,6 @@ const DEFAULT_THROTTLE_INTERVAL = 128;
function shouldSendBinary(message: any): boolean {
return Object.values(message).some(
(value) =>
value instanceof Buffer ||
value instanceof Blob ||
value instanceof ArrayBuffer ||
value instanceof Uint8Array
@ -478,10 +477,7 @@ export const realtimeImpl: RealtimeClient = {
onResult(result);
return;
}
if (
event.data instanceof Buffer ||
event.data instanceof Uint8Array
) {
if (event.data instanceof Uint8Array) {
const result = unpack(event.data);
onResult(result);
return;