diff --git a/assets/js/cat.js b/assets/js/cat.js index ecc6e5bc4..95ec23bea 100644 --- a/assets/js/cat.js +++ b/assets/js/cat.js @@ -745,6 +745,12 @@ $(document).ready(function() { } } + // Validate that we have frequency data before proceeding + if (!data.frequency || data.frequency == 0 || data.frequency == null) { + console.warn('CAT: No valid frequency data received'); + return; + } + // Force update by clearing catValue (prevents cat2UI from blocking updates) $frequency.removeData('catValue'); cat_updating_frequency = true; // Set flag before CAT update diff --git a/assets/js/sections/bandmap_list.js b/assets/js/sections/bandmap_list.js index 01f2757bb..3a5a98fb8 100644 --- a/assets/js/sections/bandmap_list.js +++ b/assets/js/sections/bandmap_list.js @@ -1698,9 +1698,11 @@ $(function() { if (cachedSpot && cachedSpot.band) { shouldDecrementTTL = (cachedSpot.band === bandForAPI); } - } if (shouldDecrementTTL) { - newTTL = ttl - 1; // Decrement only if in scope of this fetch - } + } + + if (shouldDecrementTTL) { + newTTL = ttl - 1; // Decrement only if in scope of this fetch + } if (newSpotKeys.has(key)) { newTTL = 1; // Reset to 1 if spot still exists (keeps it valid)