8000 Don't try to decode a null payloads by lminaudier · Pull Request #1017 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't try to decode a null payloads #1017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib/utilities/decode-payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export function decodePayload(
// This could decode to any object. So we either use the payload object passed in or decode it
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): Payload | Record<any, any> | string {
if (payload === null) {
return payload;
}

const encoding = atob(String(payload?.metadata?.encoding ?? ''));

// Help users out with an english encoding
Expand Down
0