From 1af45d9626a41a34803785c17b7768b817377f70 Mon Sep 17 00:00:00 2001 From: lsagona Date: Wed, 18 Nov 2020 09:59:08 +0100 Subject: [PATCH] fix offset --- src/app/model/vessel.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/model/vessel.ts b/src/app/model/vessel.ts index 5d56693..15aad34 100644 --- a/src/app/model/vessel.ts +++ b/src/app/model/vessel.ts @@ -11,7 +11,6 @@ export class Vessel { addMessage(message: Message): void { this.messages.push(message); this.determineFirstAppearance(message); - } getMMSI(): string { @@ -31,7 +30,7 @@ export class Vessel { determineFirstAppearance(message: Message): void { const timeInS = Date.parse(message.time) / 1000; - if (this.firstAppearance > timeInS) { + if (this.firstAppearance === undefined || this.firstAppearance > timeInS) { this.firstAppearance = timeInS; } } -- 1.7.10.4