possible fix for reading chat list from undefined

This commit is contained in:
DJ2LS 2023-10-31 14:25:56 +01:00
parent a7b32369b6
commit cac628817d

View file

@ -452,7 +452,7 @@ export function getNewMessagesByDXCallsign(dxcallsign): [number, number, any] {
let new_counter = 0;
let total_counter = 0;
let item_array = [];
if (typeof dxcallsign !== "undefined") {
if (typeof dxcallsign !== "undefined" && typeof chat.sorted_chat_list[dxcallsign] !== "undefined" ) {
for (const key in chat.sorted_chat_list[dxcallsign]) {
//console.log(chat.sorted_chat_list[dxcallsign][key])
//item_array.push(chat.sorted_chat_list[dxcallsign][key])