mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-01-29 21:39:41 +00:00
Fix a JavaScript error in case of null attribute and an interface conversion error in the API server (#540)
This commit is contained in:
@@ -579,12 +579,18 @@ func representConnectionStart(event map[string]interface{}) []interface{} {
|
||||
}
|
||||
|
||||
func representConnectionClose(event map[string]interface{}) []interface{} {
|
||||
replyCode := ""
|
||||
|
||||
if event["replyCode"] != nil {
|
||||
replyCode = fmt.Sprintf("%g", event["replyCode"].(float64))
|
||||
}
|
||||
|
||||
rep := make([]interface{}, 0)
|
||||
|
||||
details, _ := json.Marshal([]api.TableData{
|
||||
{
|
||||
Name: "Reply Code",
|
||||
Value: fmt.Sprintf("%g", event["replyCode"].(float64)),
|
||||
Value: replyCode,
|
||||
Selector: `request.replyCode`,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ export const EntriesList: React.FC<EntriesListProps> = ({entries, setEntries, qu
|
||||
}
|
||||
setIsLoadingTop(true);
|
||||
const data = await api.fetchEntries(leftOffTop, -1, query, 100, 3000);
|
||||
if (!data || !data.meta) {
|
||||
if (!data || data.data === null || data.meta === null) {
|
||||
setNoMoreDataTop(true);
|
||||
setIsLoadingTop(false);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user