File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
pages/browser/components/hash-details Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ const HashDetails = (props: Props) => {
377
377
content = { tooltipContent }
378
378
anchorClassName = "truncateText"
379
379
>
380
- < > { formattedValue . substring ?.( 0 , 200 ) ?? formattedValue } </ >
380
+ < > { formattedValue ? .substring ?.( 0 , 200 ) ?? formattedValue } </ >
381
381
</ EuiToolTip >
382
382
) }
383
383
{ expanded && formattedValue }
Original file line number Diff line number Diff line change 1
1
import { decode , encode } from '@msgpack/msgpack'
2
2
// eslint-disable-next-line import/order
3
3
import { Buffer } from 'buffer'
4
+ import { isUndefined } from 'lodash'
4
5
import { serialize , unserialize } from 'php-serialize'
5
6
import { getData } from 'rawproto'
6
7
import jpickle from 'jpickle'
@@ -108,6 +109,14 @@ const formattingBuffer = (
108
109
case KeyValueFormat . Pickle : {
109
110
try {
110
111
const decoded = jpickle . loads ( bufferToUTF8 ( reply ) )
112
+
113
+ if ( isUndefined ( decoded ) ) {
114
+ return {
115
+ value : bufferToUTF8 ( reply ) ,
116
+ isValid : false
117
+ }
118
+ }
119
+
111
120
const value = JSON . stringify ( decoded )
112
121
return JSONViewer ( { value, ...props } )
113
122
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments