diff --git a/src/index.ts b/src/index.ts index 36ee18a74e..7a3409f4c9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,13 +5,17 @@ import CustomThemeError from "./UI/CustomThemeError.svelte" async function main() { const target = document.getElementById("maindiv") const childs = Array.from(target.children) + try { + childs.forEach((ch) => target.removeChild(ch)) + } catch (e) { + console.error("Huh? Couldn't remove child!") + } try { const theme = await DetermineTheme.getTheme() new SingleThemeGui({ target, props: { theme }, }) - childs.forEach((ch) => target.removeChild(ch)) Array.from(document.getElementsByClassName("delete-on-load")).forEach((el) => { el.parentElement.removeChild(el) }) diff --git a/theme.html b/theme.html index 824e219ca4..6be69eef00 100644 --- a/theme.html +++ b/theme.html @@ -54,27 +54,25 @@ -
-
-
-
+
+
+
-
- Loading MapComplete, hang on... -
+
+ Loading MapComplete, hang on... +
-

- - MapComplete is an easy to use map viewer and map editor - -

-

- Made with OpenStreetMap -

-
+

+ + MapComplete is an easy to use map viewer and map editor + +

+

+ Made with OpenStreetMap +

+
-