From fa6e0771a53d3519c9cd00c3479414c6fd23c67a Mon Sep 17 00:00:00 2001 From: ShreshthTiwari <68736752+ShreshthTiwari@users.noreply.github.com> Date: Fri, 25 Jul 2025 13:24:30 +0530 Subject: [PATCH] variable index was not initialised before use --- utils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils.js b/utils.js index cc7cd1b..f08e580 100644 --- a/utils.js +++ b/utils.js @@ -114,12 +114,13 @@ const getSelectedDbs = () => { if (selectedWithPossibleAliases.length === 0) return defaultEditions; const selectedEditions = selectedWithPossibleAliases.map((element) => { - index = aliases.indexOf(element); + const index = aliases.indexOf(element); + if (index > -1) { return `GeoLite2-${element}`; - } else { - return element; } + + return element; }); const validValuesText = validEditions.join(', ');