From ca93227cb414afca8f7f0c5fed215adda966a048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20Gergely?= Date: Mon, 16 May 2022 23:32:06 +0200 Subject: [PATCH] align with the spec: no implicit ids --- modules/ui/general.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ui/general.js b/modules/ui/general.js index 357d9a57..f56a234d 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -202,10 +202,10 @@ function showMapTooltip(point, e, i, g) { const province = pack.cells.province[i]; const prov = province ? pack.provinces[province].fullName + ", " : ""; tip(prov + stateName); - if (statesEditor?.offsetParent) highlightEditorLine(statesEditor, state); - if (diplomacyEditor?.offsetParent) highlightEditorLine(diplomacyEditor, state); - if (militaryOverview?.offsetParent) highlightEditorLine(militaryOverview, state); - if (provincesEditor?.offsetParent) highlightEditorLine(provincesEditor, province); + if (document.getElementById('statesEditor')?.offsetParent) highlightEditorLine(statesEditor, state); + if (document.getElementById('diplomacyEditor')?.offsetParent) highlightEditorLine(diplomacyEditor, state); + if (document.getElementById('militaryOverview')?.offsetParent) highlightEditorLine(militaryOverview, state); + if (document.getElementById('provincesEditor')?.offsetParent) highlightEditorLine(provincesEditor, province); } else if (layerIsOn("toggleCultures") && pack.cells.culture[i]) { const culture = pack.cells.culture[i]; tip("Culture: " + pack.cultures[culture].name);