Fix prefer-global-this error

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser
2024-12-07 16:11:35 +01:00
parent b7b9227b3a
commit e7f97baab1
12 changed files with 26 additions and 26 deletions

View File

@@ -97,11 +97,11 @@ const htmlLegendPlugin = {
textLink.addEventListener("click", () => {
if (chart.canvas.id === "queryTypePieChart") {
window.location.href = "queries.lp?type=" + item.text;
globalThis.location.href = "queries.lp?type=" + item.text;
} else if (chart.canvas.id === "forwardDestinationPieChart") {
// Encode the forward destination as it may contain an "#" character
const upstream = encodeURIComponent(upstreams[item.text]);
window.location.href = "queries.lp?upstream=" + upstream;
globalThis.location.href = "queries.lp?upstream=" + upstream;
}
});
}