Skip to content

Commit

Permalink
Add preview text for empty raw values
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Sep 20, 2024
1 parent b0bacfd commit ba74848
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shared/log/LogUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function getLogValueText(value: any, type: LoggableType): string {
return "null";
} else if (type === LoggableType.Raw) {
let array: Uint8Array = value;
if (array.length === 0) return "(empty)";
let textArray: string[] = [];
array.forEach((byte: number) => {
textArray.push((byte & 0xff).toString(16).padStart(2, "0"));
Expand Down

0 comments on commit ba74848

Please sign in to comment.