Skip to content

Commit

Permalink
Improve display of UInt8Array values in Raw vis
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Mar 7, 2024
1 parent a989f43 commit dc92faa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/lib/src/vis/raw/RawVis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ interface Props {

function RawVis(props: Props) {
const { value } = props;
const valueAsStr = JSON.stringify(value, null, 2);

const valueAsStr =
value instanceof Uint8Array
? `Uint8Array [ ${value.toString()} ]`
: JSON.stringify(value, null, 2);

return (
<div className={styles.root}>
Expand Down

0 comments on commit dc92faa

Please sign in to comment.