Merge pull request #515 from DJ2LS/ls-gui-single-pager

possible fix for reading chat list from undefined
This commit is contained in:
DJ2LS 2023-10-31 14:43:15 +01:00 committed by GitHub
commit 34ed96aec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -452,7 +452,10 @@ 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])