From 8486c9d413e227c0b4837576c8f718a671d4085a Mon Sep 17 00:00:00 2001 From: bracesproul Date: Tue, 1 Oct 2024 11:31:29 -0700 Subject: [PATCH] fix(sdk-js): Fix null item error --- libs/sdk-js/src/client.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/sdk-js/src/client.ts b/libs/sdk-js/src/client.ts index 6ceb5333b..df42b6572 100644 --- a/libs/sdk-js/src/client.ts +++ b/libs/sdk-js/src/client.ts @@ -1050,6 +1050,11 @@ export class StoreClient extends BaseClient { const response = await this.fetch("/store/items", { params: { namespace: namespace.join("."), key }, }); + + if (!response) { + return null; + } + return { ...response, createdAt: response.created_at,