Commit 1af45d9626a41a34803785c17b7768b817377f70

Authored by lsagona
1 parent 76c0c81912
Exists in master

fix offset

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

src/app/model/vessel.ts View file @ 1af45d9
... ... @@ -11,7 +11,6 @@
11 11 addMessage(message: Message): void {
12 12 this.messages.push(message);
13 13 this.determineFirstAppearance(message);
14   -
15 14 }
16 15  
17 16 getMMSI(): string {
... ... @@ -31,7 +30,7 @@
31 30  
32 31 determineFirstAppearance(message: Message): void {
33 32 const timeInS = Date.parse(message.time) / 1000;
34   - if (this.firstAppearance > timeInS) {
  33 + if (this.firstAppearance === undefined || this.firstAppearance > timeInS) {
35 34 this.firstAppearance = timeInS;
36 35 }
37 36 }