Fix race condition of `selectedStatusPagesOptions`

pull/1213/head
Louis Lam 2 years ago
parent 7853c2cc38
commit 617ba49e6c

@ -138,13 +138,21 @@ export default {
affectedMonitorsOptions: [], affectedMonitorsOptions: [],
showOnAllPages: false, showOnAllPages: false,
selectedStatusPages: [], selectedStatusPages: [],
selectedStatusPagesOptions: [],
dark: (this.$root.theme === "dark"), dark: (this.$root.theme === "dark"),
}; };
}, },
computed: { computed: {
selectedStatusPagesOptions() {
return Object.values(this.$root.statusPageList).map(statusPage => {
return {
id: statusPage.id,
name: statusPage.title
};
});
},
pageName() { pageName() {
return this.$t((this.isAdd) ? "Schedule Maintenance" : "Edit Maintenance"); return this.$t((this.isAdd) ? "Schedule Maintenance" : "Edit Maintenance");
}, },
@ -177,13 +185,6 @@ export default {
}); });
} }
}); });
Object.values(this.$root.statusPageList).map(statusPage => {
this.selectedStatusPagesOptions.push({
id: statusPage.id,
name: statusPage.title
});
});
}, },
methods: { methods: {
init() { init() {

Loading…
Cancel
Save