Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Merge pull request #74 from upstash/hotfix-json-parse-issue
Browse files Browse the repository at this point in the history
parse rawData twice to make sure that we get the JSON object
  • Loading branch information
CahidArda authored May 24, 2024
2 parents 442c2dc + 037ac9e commit 51b4dab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const prettifyData = (data: string) => {

const rawToObject = (rawData: string) => {
try {
return JSON.parse(rawData);
return JSON.parse(JSON.parse(rawData));
} catch (_error) {
return rawData;
}
Expand Down

0 comments on commit 51b4dab

Please sign in to comment.