From 4ef353326468de47309afc2e9251efb8a579b77c Mon Sep 17 00:00:00 2001 From: thyttan <97237430+thyttan@users.noreply.github.com> Date: Sun, 9 Jun 2024 15:50:50 +0200 Subject: [PATCH] astrocalc: fix lint warning - remove the variable `m` that was repeatedly assigned the return value of `E.showMenu` but never used. --- apps/astrocalc/astrocalc-app.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/apps/astrocalc/astrocalc-app.js b/apps/astrocalc/astrocalc-app.js index 987470351..283c5aab7 100644 --- a/apps/astrocalc/astrocalc-app.js +++ b/apps/astrocalc/astrocalc-app.js @@ -232,8 +232,6 @@ function drawSunShowPage(gps, key, date) { return null; } -let m; - function sunIndexPageMenu(gps) { const sunTimes = SunCalc.getTimes(new Date(), gps.lat, gps.lon); @@ -242,7 +240,7 @@ function sunIndexPageMenu(gps) { "title": "-- Sun --", }, "Current Pos": () => { - m = E.showMenu(); + E.showMenu(); drawSunShowPage(gps, "Current Pos", new Date()); }, }; @@ -250,13 +248,13 @@ function sunIndexPageMenu(gps) { Object.keys(sunTimes).sort().reduce((menu, key) => { const title = titlizeKey(key); menu[title] = () => { - m = E.showMenu(); + E.showMenu(); drawSunShowPage(gps, key, sunTimes[key]); }; return menu; }, sunMenu); - sunMenu["< Back"] = () => m = indexPageMenu(gps); + sunMenu["< Back"] = () => indexPageMenu(gps); return E.showMenu(sunMenu); } @@ -268,18 +266,18 @@ function moonIndexPageMenu(gps) { "title": "-- Moon --", }, "Times": () => { - m = E.showMenu(); + E.showMenu(); drawMoonTimesPage(gps, /*LANG*/"Times"); }, "Position": () => { - m = E.showMenu(); + E.showMenu(); drawMoonPositionPage(gps, /*LANG*/"Position"); }, "Illumination": () => { - m = E.showMenu(); + E.showMenu(); drawMoonIlluminationPage(gps, /*LANG*/"Illumination"); }, - "< Back": () => m = indexPageMenu(gps), + "< Back": () => indexPageMenu(gps), }; return E.showMenu(moonMenu); @@ -291,10 +289,10 @@ function indexPageMenu(gps) { "title": /*LANG*/"Select", }, /*LANG*/"Sun": () => { - m = sunIndexPageMenu(gps); + sunIndexPageMenu(gps); }, /*LANG*/"Moon": () => { - m = moonIndexPageMenu(gps); + moonIndexPageMenu(gps); }, "< Back": () => { load(); } };