@formant/data-sdk 1.56.0 → 1.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32441,30 +32441,33 @@ class TelemetryUniverseData extends BasicUniverseDataConnector {
32441
32441
  const s = this.getAvailableDataFetchWorker();
32442
32442
  if (!s)
32443
32443
  throw new Error("No available data fetch worker");
32444
- const g = this.subscribeTelemetry(
32444
+ let g = 0;
32445
+ const l = this.subscribeTelemetry(
32445
32446
  n,
32446
32447
  r,
32447
32448
  "localization",
32448
- async (l) => {
32449
- if (l === "too much data" || l === void 0) {
32449
+ async (u) => {
32450
+ if (u === "too much data" || u === void 0) {
32450
32451
  o(NoData);
32451
32452
  return;
32452
32453
  }
32453
- const u = this.getNearestPoint(l)[1];
32454
- if (u.url) {
32455
- const c = await fetch(u.url).then(
32456
- (d) => d.json()
32457
- );
32458
- c.path && o(c.path);
32459
- return;
32460
- } else if (u.path) {
32461
- o(u.path);
32462
- return;
32454
+ const c = this.getNearestPoint(u), d = c[1], B = c[0];
32455
+ if (B !== g) {
32456
+ if (g = B, d.url) {
32457
+ const R = await fetch(d.url).then(
32458
+ (f) => f.json()
32459
+ );
32460
+ R.path && B >= g && o(R.path);
32461
+ return;
32462
+ } else if (d.path && B >= g) {
32463
+ o(d.path);
32464
+ return;
32465
+ }
32463
32466
  }
32464
32467
  }
32465
32468
  );
32466
32469
  return () => {
32467
- this.releaseDataFetchWorker(s), g();
32470
+ this.releaseDataFetchWorker(s), l();
32468
32471
  };
32469
32472
  }
32470
32473
  onTimeChange(n) {