diff --git a/ui/src/components/header/HeaderNotice.vue b/ui/src/components/header/HeaderNotice.vue index e807e9cb847..1cbbb6b7ebc 100644 --- a/ui/src/components/header/HeaderNotice.vue +++ b/ui/src/components/header/HeaderNotice.vue @@ -122,7 +122,7 @@ export default { this.startPolling() }, mounted () { - this.jobs = store.getters.asyncJobIds.reverse() + this.jobs = (store.getters.asyncJobIds || []).reverse() this.$store.watch( (state, getters) => getters.asyncJobIds, (newValue, oldValue) => { diff --git a/ui/src/core/bootstrap.js b/ui/src/core/bootstrap.js index da7d184d541..ceefe3fa6c8 100644 --- a/ui/src/core/bootstrap.js +++ b/ui/src/core/bootstrap.js @@ -47,5 +47,5 @@ export default function Initializer () { store.commit('TOGGLE_MULTI_TAB', Vue.ls.get(DEFAULT_MULTI_TAB, config.multiTab)) store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN)) store.commit('SET_PROJECT', Vue.ls.get(CURRENT_PROJECT)) - store.commit('SET_ASYNC_JOB_IDS', Vue.ls.get(ASYNC_JOB_IDS)) + store.commit('SET_ASYNC_JOB_IDS', Vue.ls.get(ASYNC_JOB_IDS) || []) }