Skip to content

Commit

Permalink
fix tags cancel, fix json content viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
NikhilShahi committed Sep 26, 2022
1 parent 3056d38 commit a88e961
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion frontend/src/components/Endpoint/DataFieldTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ export const DataFieldTagList: React.FC<TagListProps> = React.memo(
>
Save
</Button>
<Button rounded="sm" size="sm" onClick={() => setEditing(false)}>
<Button
rounded="sm"
size="sm"
onClick={() => {
setEditing(false)
setEditedTags(tags)
}}
>
Cancel
</Button>
</HStack>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Endpoint/TraceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const JSONContentViewer = (
) => {
const bgColor = colorMode === "dark" ? "#4C5564" : "#EDF2F7"
try {
const parsedData = JSON.parse(data)
const parsedData = JSON.parse(data ?? "{}")
if (typeof parsedData !== "object" && !Array.isArray(parsedData)) {
throw new Error()
}
Expand Down

0 comments on commit a88e961

Please sign in to comment.