From b2ee85a92860dadc14cc72f2b6d78b14bcaad854 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 5 Sep 2023 23:41:17 +0200 Subject: [PATCH] flight may be missing, it seems --- htdocs/lib/MessagePanel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/lib/MessagePanel.js b/htdocs/lib/MessagePanel.js index 503f26ec..54fcee32 100644 --- a/htdocs/lib/MessagePanel.js +++ b/htdocs/lib/MessagePanel.js @@ -535,7 +535,9 @@ HfdlMessagePanel.prototype.pushMessage = function(message) { if ('acars' in hfnpdu) { var acars = hfnpdu['acars']; details = '

ACARS message

'; - details += '
Flight: ' + acars['flight'] + '
'; + if ('flight' in acars) { + details += '
Flight: ' + acars['flight'] + '
'; + } details += '
Registration: ' + acars['reg'].replace(/^\.+/g, '') + '
'; details += '
' + acars['msg_text'] + '
'; }