[fix](trx-frontend-http): guard initAprsMap against missing Leaflet variable
Prevent ReferenceError when navigating to the map tab before the Leaflet CDN script has finished loading. https://claude.ai/code/session_018nDze1zN1AR3UgYRx5pqcL Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6030,6 +6030,7 @@ function materializeBufferedMapLayers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initAprsMap() {
|
function initAprsMap() {
|
||||||
|
if (typeof L === "undefined") return;
|
||||||
const mapEl = document.getElementById("aprs-map");
|
const mapEl = document.getElementById("aprs-map");
|
||||||
if (!mapEl) return;
|
if (!mapEl) return;
|
||||||
sizeAprsMapToViewport();
|
sizeAprsMapToViewport();
|
||||||
|
|||||||
Reference in New Issue
Block a user