From dd47752e632e8f75f30daac52b55907c7ea5ba0a Mon Sep 17 00:00:00 2001 From: secondl1ght Date: Fri, 15 Dec 2023 19:50:09 -0700 Subject: [PATCH] fix ts and add tsc to ci --- .github/workflows/lint-format-build.yml | 3 +++ src/lib/map/setup.ts | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint-format-build.yml b/.github/workflows/lint-format-build.yml index e124fbc6..b776f07f 100644 --- a/.github/workflows/lint-format-build.yml +++ b/.github/workflows/lint-format-build.yml @@ -18,6 +18,9 @@ jobs: - name: run check run: yarn check + - name: compile ts + run: yarn tsc + - name: create .env run: cp .env.example .env diff --git a/src/lib/map/setup.ts b/src/lib/map/setup.ts index f7ef191b..b83e12ac 100644 --- a/src/lib/map/setup.ts +++ b/src/lib/map/setup.ts @@ -1006,12 +1006,15 @@ ${ if ((description || note) && element.tags && element.tags.name) { const infoContainer = popupContainer.querySelector('#info'); - new InfoTooltip({ - target: infoContainer, - props: { - tooltip: description || note - } - }); + + if (infoContainer) { + new InfoTooltip({ + target: infoContainer, + props: { + tooltip: description || note + } + }); + } } const showMoreDiv = popupContainer.querySelector('#show-more');