From 236f8d89976e89572e773d345a9dcc3efe68dc52 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Sun, 1 Dec 2019 18:26:35 +0100 Subject: [PATCH] root error catching --- static/js/main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index fa548e9..da9fe08 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -9,10 +9,13 @@ import layerManager from './LayerManager.js'; // hash route compat hashCompat(); -getConfig().then(cfg => { - +getConfig() +.then(cfg => { layerManager.setup(cfg.layers); config.set(cfg); wsChannel.connect(); m.route(document.getElementById("app"), "/map/0/12/0/0", routes); +}) +.catch(e => { + document.getElementById("app").innerHTML = JSON.stringify(e); });