From febf986195da70cf33d2dfd11fabb776bef07c66 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 27 Dec 2022 11:09:13 -0500 Subject: [PATCH] Handle null pointer correctly --- webcit-ng/static/js/view_mail.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webcit-ng/static/js/view_mail.js b/webcit-ng/static/js/view_mail.js index 50e56eac4..138be233e 100644 --- a/webcit-ng/static/js/view_mail.js +++ b/webcit-ng/static/js/view_mail.js @@ -270,9 +270,11 @@ function render_mailbox_display(notify) { // If one or more messages was already selected, remember them so we can re-select them if (displayed_message > 0) { - for (i=0; row=oldtable.rows[i]; ++i) { - if (row.classList.contains("ctdl-mail-selected")) { - previously_selected.push(parseInt(row["id"].substring(12))); + if (oldtable) { + for (i=0; row=oldtable.rows[i]; ++i) { + if (row.classList.contains("ctdl-mail-selected")) { + previously_selected.push(parseInt(row["id"].substring(12))); + } } } } -- 2.39.2