Fix security issues, breaking changes, and code cleanup for weather satellite PR

Co-authored-by: mitchross <6330506+mitchross@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-09 20:58:26 +00:00
parent 35cf01c11e
commit d41ba61aee
8 changed files with 54 additions and 31 deletions

View File

@@ -446,8 +446,17 @@ const WeatherSat = (function() {
* Load pass predictions (with trajectory + ground track)
*/
async function loadPasses() {
const storedLat = localStorage.getItem('observerLat');
const storedLon = localStorage.getItem('observerLon');
let storedLat, storedLon;
// Use ObserverLocation if available, otherwise fall back to localStorage
if (window.ObserverLocation && ObserverLocation.isSharedEnabled()) {
const shared = ObserverLocation.getShared();
storedLat = shared?.lat?.toString();
storedLon = shared?.lon?.toString();
} else {
storedLat = localStorage.getItem('observerLat');
storedLon = localStorage.getItem('observerLon');
}
if (!storedLat || !storedLon) {
renderPasses([]);