astrocalc: fix lint warning

- remove the variable `m` that was repeatedly assigned the return value of `E.showMenu` but never used.
pull/3447/head
thyttan 2024-06-09 15:50:50 +02:00 committed by GitHub
parent fe3142355b
commit 4ef3533264
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 11 deletions

View File

@ -232,8 +232,6 @@ function drawSunShowPage(gps, key, date) {
return null; return null;
} }
let m;
function sunIndexPageMenu(gps) { function sunIndexPageMenu(gps) {
const sunTimes = SunCalc.getTimes(new Date(), gps.lat, gps.lon); const sunTimes = SunCalc.getTimes(new Date(), gps.lat, gps.lon);
@ -242,7 +240,7 @@ function sunIndexPageMenu(gps) {
"title": "-- Sun --", "title": "-- Sun --",
}, },
"Current Pos": () => { "Current Pos": () => {
m = E.showMenu(); E.showMenu();
drawSunShowPage(gps, "Current Pos", new Date()); drawSunShowPage(gps, "Current Pos", new Date());
}, },
}; };
@ -250,13 +248,13 @@ function sunIndexPageMenu(gps) {
Object.keys(sunTimes).sort().reduce((menu, key) => { Object.keys(sunTimes).sort().reduce((menu, key) => {
const title = titlizeKey(key); const title = titlizeKey(key);
menu[title] = () => { menu[title] = () => {
m = E.showMenu(); E.showMenu();
drawSunShowPage(gps, key, sunTimes[key]); drawSunShowPage(gps, key, sunTimes[key]);
}; };
return menu; return menu;
}, sunMenu); }, sunMenu);
sunMenu["< Back"] = () => m = indexPageMenu(gps); sunMenu["< Back"] = () => indexPageMenu(gps);
return E.showMenu(sunMenu); return E.showMenu(sunMenu);
} }
@ -268,18 +266,18 @@ function moonIndexPageMenu(gps) {
"title": "-- Moon --", "title": "-- Moon --",
}, },
"Times": () => { "Times": () => {
m = E.showMenu(); E.showMenu();
drawMoonTimesPage(gps, /*LANG*/"Times"); drawMoonTimesPage(gps, /*LANG*/"Times");
}, },
"Position": () => { "Position": () => {
m = E.showMenu(); E.showMenu();
drawMoonPositionPage(gps, /*LANG*/"Position"); drawMoonPositionPage(gps, /*LANG*/"Position");
}, },
"Illumination": () => { "Illumination": () => {
m = E.showMenu(); E.showMenu();
drawMoonIlluminationPage(gps, /*LANG*/"Illumination"); drawMoonIlluminationPage(gps, /*LANG*/"Illumination");
}, },
"< Back": () => m = indexPageMenu(gps), "< Back": () => indexPageMenu(gps),
}; };
return E.showMenu(moonMenu); return E.showMenu(moonMenu);
@ -291,10 +289,10 @@ function indexPageMenu(gps) {
"title": /*LANG*/"Select", "title": /*LANG*/"Select",
}, },
/*LANG*/"Sun": () => { /*LANG*/"Sun": () => {
m = sunIndexPageMenu(gps); sunIndexPageMenu(gps);
}, },
/*LANG*/"Moon": () => { /*LANG*/"Moon": () => {
m = moonIndexPageMenu(gps); moonIndexPageMenu(gps);
}, },
"< Back": () => { load(); } "< Back": () => { load(); }
}; };