diff --git a/src/components/AuthError.vue b/src/components/AuthError.vue index 54f1b34..49114d9 100644 --- a/src/components/AuthError.vue +++ b/src/components/AuthError.vue @@ -13,7 +13,7 @@ export default { inject: ['$error'], computed: { msg() { - return this.$auth0.error.value || this.$error.value; + return this.$auth0.error?.value || this.$error?.value; } } }; diff --git a/src/components/TodoList.vue b/src/components/TodoList.vue index bcd2198..201bb4c 100644 --- a/src/components/TodoList.vue +++ b/src/components/TodoList.vue @@ -70,7 +70,7 @@ export default { eventStream.onerror = function (err) { setTimeout(() => { - if (eventStream.readyState != EventSource.OPEN) { + if (error && eventStream.readyState != EventSource.OPEN) { error.value = "Login Required"; } }, 3000);