fix: check type before trying to upload (#63)

This commit is contained in:
Daniel Rochetti 2024-04-16 18:02:50 -07:00 committed by GitHub
parent 9262814578
commit 18eb6ec28d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -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",

View File

@ -104,6 +104,9 @@ export const storageImpl: StorageSupport = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
transformInput: async (input: Record<string, any>) => {
if (!isPlainObject(input)) {
return input;
}
const promises = Object.entries(input).map(async ([key, value]) => {
if (
value instanceof Blob ||