From cba039d41a7377f6073d23cd97a2cc155f3d08f0 Mon Sep 17 00:00:00 2001 From: Theodore Kruczek Date: Fri, 19 Jan 2024 15:39:20 -0500 Subject: [PATCH] fix: :bug: fix missing name property on GroundObjects --- src/objects/GroundObject.ts | 3 ++- test/objects/__snapshots__/GroundObject.test.ts.snap | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/objects/GroundObject.ts b/src/objects/GroundObject.ts index 50b4b43..5ab815d 100644 --- a/src/objects/GroundObject.ts +++ b/src/objects/GroundObject.ts @@ -43,7 +43,7 @@ import { BaseObject } from './BaseObject'; import { Satellite } from './Satellite'; export class GroundObject extends BaseObject { - name = 'Unknown Ground Position'; + name = 'Unknown Ground Object'; lat: Degrees; lon: Degrees; alt: Kilometers; @@ -52,6 +52,7 @@ export class GroundObject extends BaseObject { super(info); this.validateGroundObjectInputData_(info); + this.name = info.name ?? this.name; this.lat = info.lat; this.lon = info.lon; this.alt = info.alt; diff --git a/test/objects/__snapshots__/GroundObject.test.ts.snap b/test/objects/__snapshots__/GroundObject.test.ts.snap index 8f96319..91b808f 100644 --- a/test/objects/__snapshots__/GroundObject.test.ts.snap +++ b/test/objects/__snapshots__/GroundObject.test.ts.snap @@ -39,7 +39,7 @@ GroundObject { "id": undefined, "lat": 0, "lon": 0, - "name": "Unknown Ground Position", + "name": "Unknown Ground Object", "position": Object { "x": 0, "y": 0,