fix(client): local creds warning on resolvers (#83)

This commit is contained in:
Daniel Rochetti 2024-08-07 17:06:13 -07:00 committed by GitHub
parent 2ff481614b
commit b3ab5f0e15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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.14.1", "version": "0.14.2",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -119,7 +119,12 @@ export function config(config: Config) {
), ),
}; };
} }
const { credentials, suppressLocalCredentialsWarning } = configuration; const { credentials: resolveCredentials, suppressLocalCredentialsWarning } =
configuration;
const credentials =
typeof resolveCredentials === "function"
? resolveCredentials()
: resolveCredentials;
if ( if (
typeof window !== "undefined" && typeof window !== "undefined" &&
credentials && credentials &&