From e7b322d6b31417cd82b9dda8fbfe5502bee2adb6 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Thu, 26 Dec 2024 18:58:07 -0600 Subject: [PATCH] fix(cli): requiresRefresh function does not respect null --- packages/aws-cdk/lib/api/aws-auth/provider-caching.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts b/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts index 22e4b357e191d..766e92d08b864 100644 --- a/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts +++ b/packages/aws-cdk/lib/api/aws-auth/provider-caching.ts @@ -15,7 +15,8 @@ export function makeCachingProvider(provider: AwsCredentialIdentityProvider): Aw return memoize( provider, credentialsAboutToExpire, - (token) => token.expiration !== undefined); + (token) => !!token.expiration, + ); } export function credentialsAboutToExpire(token: AwsCredentialIdentity) {