diff --git a/starsky/starsky/clientapp/src/components/organisms/detail-view-media/detail-view-gpx.tsx b/starsky/starsky/clientapp/src/components/organisms/detail-view-media/detail-view-gpx.tsx index 3eb1e258c..8b3cfdee5 100644 --- a/starsky/starsky/clientapp/src/components/organisms/detail-view-media/detail-view-gpx.tsx +++ b/starsky/starsky/clientapp/src/components/organisms/detail-view-media/detail-view-gpx.tsx @@ -32,7 +32,7 @@ const DetailViewGpx: React.FC = () => { mapReference.current.innerHTML = ""; const container = L.DomUtil.get(mapReference.current); if (container != null) { - (container as HTMLElement as unknown as { _leaflet_id: null })._leaflet_id = null; + (container as unknown as { _leaflet_id: null })._leaflet_id = null; } const tracks: [number, number][] = []; diff --git a/starsky/starsky/clientapp/src/hooks/use-capture-position.ts b/starsky/starsky/clientapp/src/hooks/use-capture-position.ts index a051a9d41..e31cfe85c 100644 --- a/starsky/starsky/clientapp/src/hooks/use-capture-position.ts +++ b/starsky/starsky/clientapp/src/hooks/use-capture-position.ts @@ -9,14 +9,14 @@ const capturePosition = () => { const topCachedPosition = window.scrollY; return { freeze: () => { - (document.body as HTMLElement).style.position = "fixed"; - (document.body as HTMLElement).style.top = `${topCachedPosition * -1}px`; - (document.body as HTMLElement).style.width = "100%"; + document.body.style.position = "fixed"; + document.body.style.top = `${topCachedPosition * -1}px`; + document.body.style.width = "100%"; }, unfreeze: () => { - (document.body as HTMLElement).style.position = "initial"; - (document.body as HTMLElement).style.top = "initial"; - (document.body as HTMLElement).style.width = "initial"; + document.body.style.position = "initial"; + document.body.style.top = "initial"; + document.body.style.width = "initial"; window.scrollTo(0, topCachedPosition); } } as ICaptionPosition; diff --git a/starsky/starsky/clientapp/src/shared/leaflet/leaflet-modify-empty-image-url-tilelayer.ts b/starsky/starsky/clientapp/src/shared/leaflet/leaflet-modify-empty-image-url-tilelayer.ts index 8f13d7eba..f0143a33e 100644 --- a/starsky/starsky/clientapp/src/shared/leaflet/leaflet-modify-empty-image-url-tilelayer.ts +++ b/starsky/starsky/clientapp/src/shared/leaflet/leaflet-modify-empty-image-url-tilelayer.ts @@ -28,7 +28,7 @@ export class LeafletEmptyImageUrlTileLayer extends TileLayer { tile.onload = L.Util.falseFn; tile.onerror = L.Util.falseFn; - if (!(tile as HTMLImageElement).complete) { + if (!tile.complete) { tile.src = EmptyImageUrl; // Replace emptyImageUrl L.DomUtil.remove(tile); delete this._tiles[i];