diff options
author | ManeraKai <manerakai@protonmail.com> | 2024-07-21 21:09:11 +0300 |
---|---|---|
committer | ManeraKai <manerakai@protonmail.com> | 2024-07-21 21:09:11 +0300 |
commit | 8bf25954a3fe24cfd0968b0700cf0c73c30b623d (patch) | |
tree | 275255099efb8136e818f18e499f56df3523cbf3 | |
parent | 2.8.4 => 2.8.5 (diff) | |
download | libredirect-8bf25954a3fe24cfd0968b0700cf0c73c30b623d.zip |
Fixed undefined in settings https://github.com/libredirect/browser_extension/issues/957
-rw-r--r-- | src/pages/options/index.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/pages/options/index.js b/src/pages/options/index.js index 0066df0d..62708f7b 100644 --- a/src/pages/options/index.js +++ b/src/pages/options/index.js @@ -188,11 +188,13 @@ async function calcCustomInstances(frontend) { document.getElementById(frontend).getElementsByClassName("custom-checklist")[0].innerHTML = customInstances .map( x => { - const time = pingCache[x] - if (time) { - const { color, text } = processTime(time) - var timeText = `<span class="ping" style="color:${color};">${text}</span>` - } + const time = pingCache[x]; + if (time) { + var { color, text } = processTime(time); + } + const timeText = time + ? `<span class="ping" style="color:${color};">${text}</span>` + : ""; const custom = isCustomInstance(frontend, x) ? "" : `<span>custom</span>` return `<div> <x> |