You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2020/04/22 09:57:22 UTC

[cloudstack-primate] branch master updated: core: handle initialisation for empty async jobs list

This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git


The following commit(s) were added to refs/heads/master by this push:
     new ca8e227  core: handle initialisation for empty async jobs list
ca8e227 is described below

commit ca8e227a0ac2bbd8f6eccd69f4591bdce7f759fc
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Wed Apr 22 15:26:51 2020 +0530

    core: handle initialisation for empty async jobs list
    
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
 src/components/header/HeaderNotice.vue | 2 +-
 src/core/bootstrap.js                  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/header/HeaderNotice.vue b/src/components/header/HeaderNotice.vue
index e807e9c..1cbbb6b 100644
--- a/src/components/header/HeaderNotice.vue
+++ b/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/src/core/bootstrap.js b/src/core/bootstrap.js
index da7d184..ceefe3f 100644
--- a/src/core/bootstrap.js
+++ b/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) || [])
 }