diff --git a/src/components/ha-markdown.js b/src/components/ha-markdown.js index 95152f6082..355507ecb6 100644 --- a/src/components/ha-markdown.js +++ b/src/components/ha-markdown.js @@ -17,6 +17,7 @@ class HaMarkdown extends EventsMixin(PolymerElement) { } connectedCallback() { + super.connectedCallback(); // 0 = not loaded, 1 = success, 2 = error this._scriptLoaded = 0; this._renderScheduled = false; diff --git a/src/entrypoints/app.js b/src/entrypoints/app.js index 37ab36ecf0..735dbc1544 100644 --- a/src/entrypoints/app.js +++ b/src/entrypoints/app.js @@ -226,7 +226,7 @@ class HomeAssistant extends LocalizeMixin(PolymerElement) { const host = window.location.protocol + '//' + window.location.host; const auth = conn.options; return hassCallApi(host, auth, method, path, parameters).catch((err) => { - if (err.status_code !== 401 || !auth.accessToken) throw err; + if (!err || err.status_code !== 401 || !auth.accessToken) throw err; // If we connect with access token and get 401, refresh token and try again return window.refreshToken().then((accessToken) => {