Fix error when viewing messages without header in topic viewer

This commit is contained in:
Oleg Kalachev
2022-09-10 01:31:38 +03:00
parent 839aeb6a26
commit 880f67c3bc

View File

@@ -54,7 +54,7 @@ function viewTopic(topic) {
document.title = topic;
if (mouseDown) return;
if (msg.header.stamp) {
if (msg.header && msg.header.stamp) {
if (params.date || params.offset) {
let date = new Date(msg.header.stamp.secs * 1e3 + msg.header.stamp.nsecs * 1e-6);
if (params.date) msg.header.date = date.toISOString();