Skip to content

Commit

Permalink
Merge pull request #66 from ExpressApp/fix/ki/client-stotage
Browse files Browse the repository at this point in the history
Fix clientStorageGet on error
  • Loading branch information
ikudinov authored Oct 8, 2024
2 parents 69455ee + 52acff9 commit 8243b16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@expressms/smartapp-sdk",
"version": "1.10.0-alpha.3",
"version": "1.10.0-alpha.4",
"description": "Smartapp SDK",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/lib/client/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const clientStorageGet = ({ key }: { key: string }): Promise<ClientStorageGetRes
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { payload }: { payload: any } = event

const deserializedValue = JSON.parse(payload.value);
const deserializedValue = payload.value && JSON.parse(payload.value)

return {
...event,
payload: {
...payload,
value: deserializedValue,
}
},
} as ClientStorageGetResponse
})
}
Expand Down

0 comments on commit 8243b16

Please sign in to comment.