Skip to content

Commit 4eb32a1

Browse files
committed
Use uint8array
1 parent 95e4e1e commit 4eb32a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

redisinsight/ui/src/utils/formatters/valueFormatters.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const formattingBuffer = (
7272
case KeyValueFormat.JSON: return bufferToJSON(reply, props as FormattingProps)
7373
case KeyValueFormat.Msgpack: {
7474
try {
75-
const decoded = decode(reply.data);
75+
const decoded = decode(Uint8Array.from(reply.data));
7676
const value = JSONBigInt.stringify(decoded)
7777
return JSONViewer({ value, ...props })
7878
} catch (e) {
@@ -139,7 +139,7 @@ const bufferToSerializedFormat = (
139139
case KeyValueFormat.JSON: return reSerializeJSON(bufferToUTF8(value), space)
140140
case KeyValueFormat.Msgpack: {
141141
try {
142-
const decoded = decode(value.data)
142+
const decoded = decode(Uint8Array.from(value.data))
143143
const stringified = JSON.stringify(decoded)
144144
return reSerializeJSON(stringified, space)
145145
} catch (e) {

0 commit comments

Comments
 (0)