@aguacerowx/mapsgl 0.0.31 → 0.0.32

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aguacerowx/mapsgl",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -200,6 +200,10 @@ export class WeatherLayerManager extends EventEmitter {
200
200
  if (firstValidHour !== undefined) {
201
201
  state = { ...state, forecastHour: firstValidHour };
202
202
  this.core.state.forecastHour = firstValidHour;
203
+ } else {
204
+ // Run exists but has no valid hours yet — bail out entirely
205
+ console.warn(`[WLM._rebuildLayerAndPreload] rebuildId=${rebuildId} — ptypeRefl/HRRR: no valid hours in new run yet, aborting rebuild`);
206
+ return;
203
207
  }
204
208
  }
205
209
 
@@ -425,8 +429,14 @@ export class WeatherLayerManager extends EventEmitter {
425
429
  this.emit('data:updated', { type: 'mrms', variable: currentVariable, newTimestamps: newTimestampsToPreload });
426
430
  }
427
431
  } else {
432
+ const previousStatus = this.core.modelStatus;
428
433
  const modelStatus = await this.core.fetchModelStatus(true);
429
- this.core._emitStateChange();
434
+
435
+ // Only emit if the status actually changed
436
+ const statusChanged = JSON.stringify(previousStatus) !== JSON.stringify(modelStatus);
437
+ if (statusChanged) {
438
+ this.core._emitStateChange();
439
+ }
430
440
 
431
441
  const latestRun = findLatestModelRun(modelStatus, currentModel);
432
442
  if (!latestRun) return;