diff --git a/index.html b/index.html index 22bd6aa..05d035f 100644 --- a/index.html +++ b/index.html @@ -47,9 +47,7 @@ $('#layoutswitcher').on('change', function() { switchLayout(this.value); }); - currentLayout = layout['de_CH']; - renderLayout(); - startClock(); + switchLayout('de_CH'); }); diff --git a/uhr.js b/uhr.js index 783aae3..676dc35 100644 --- a/uhr.js +++ b/uhr.js @@ -97,6 +97,9 @@ function switchTheme(theme) { function switchLayout(locale) { stopClock(); currentLayout = layout[locale]; + if (currentLayout == undefined) { + currentLayout = layout['default']; + } renderLayout(); if (isOn()) { startClock();