fix(client): wrong usage of Buffer (#37)
This commit is contained in:
parent
e5cfd8ee38
commit
6a89dd1ba0
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@fal-ai/serverless-client",
|
"name": "@fal-ai/serverless-client",
|
||||||
"description": "The fal serverless JS/TS client",
|
"description": "The fal serverless JS/TS client",
|
||||||
"version": "0.7.1",
|
"version": "0.7.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@ -271,7 +271,6 @@ const DEFAULT_THROTTLE_INTERVAL = 128;
|
|||||||
function shouldSendBinary(message: any): boolean {
|
function shouldSendBinary(message: any): boolean {
|
||||||
return Object.values(message).some(
|
return Object.values(message).some(
|
||||||
(value) =>
|
(value) =>
|
||||||
value instanceof Buffer ||
|
|
||||||
value instanceof Blob ||
|
value instanceof Blob ||
|
||||||
value instanceof ArrayBuffer ||
|
value instanceof ArrayBuffer ||
|
||||||
value instanceof Uint8Array
|
value instanceof Uint8Array
|
||||||
@ -478,10 +477,7 @@ export const realtimeImpl: RealtimeClient = {
|
|||||||
onResult(result);
|
onResult(result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (event.data instanceof Uint8Array) {
|
||||||
event.data instanceof Buffer ||
|
|
||||||
event.data instanceof Uint8Array
|
|
||||||
) {
|
|
||||||
const result = unpack(event.data);
|
const result = unpack(event.data);
|
||||||
onResult(result);
|
onResult(result);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user