Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

fix(agent): age World Packet feeds against the clock for non-finite now

Said Turksever0f237a32d476
diff --git a/src/agent/worldPacket.js b/src/agent/worldPacket.js
index 0987a7fce..4f8dad144 100644
--- a/src/agent/worldPacket.js
+++ b/src/agent/worldPacket.js
@@ -99,8 +99,11 @@ export function getWorldPacket(options = {}) {
styleManager,
dataManager,
sceneDirector = null,
- now = Date.now(),
+ now: requestedNow,
} = options ?? {};
+ // A default parameter only covers undefined; null or NaN would age every
+ // feed against the epoch and report stale data as "just now".
+ const now = Number.isFinite(requestedNow) ? requestedNow : Date.now();
if (!viewer?.camera?.positionWC)
throw new TypeError('World Packet requires a viewer camera');
if (!dataManager || typeof dataManager.getAll !== 'function')