From 18eb6ec28d5b7f727a6270af5339cb3eefd0e148 Mon Sep 17 00:00:00 2001 From: Daniel Rochetti Date: Tue, 16 Apr 2024 18:02:50 -0700 Subject: [PATCH] fix: check type before trying to upload (#63) --- libs/client/package.json | 2 +- libs/client/src/storage.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/client/package.json b/libs/client/package.json index b51a260..5abf3fc 100644 --- a/libs/client/package.json +++ b/libs/client/package.json @@ -1,7 +1,7 @@ { "name": "@fal-ai/serverless-client", "description": "The fal serverless JS/TS client", - "version": "0.9.2", + "version": "0.9.3", "license": "MIT", "repository": { "type": "git", diff --git a/libs/client/src/storage.ts b/libs/client/src/storage.ts index 6b81038..439a5f8 100644 --- a/libs/client/src/storage.ts +++ b/libs/client/src/storage.ts @@ -104,6 +104,9 @@ export const storageImpl: StorageSupport = { // eslint-disable-next-line @typescript-eslint/no-explicit-any transformInput: async (input: Record) => { + if (!isPlainObject(input)) { + return input; + } const promises = Object.entries(input).map(async ([key, value]) => { if ( value instanceof Blob ||