Skip to content

Commit 75ecb4d

Browse files
committed
fix fetchdata imagedeploybtn
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent cf522b0 commit 75ecb4d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/src/components/view/ImageDeployInstanceButton.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,13 @@ export default {
6464
osCategoryId: null
6565
}
6666
},
67-
created () {
67+
mounted () {
6868
if (this.$route.meta.name === 'iso') {
6969
this.imageApi = 'listIsos'
7070
}
71-
this.fetchData()
71+
setTimeout(() => {
72+
this.fetchData()
73+
}, 100)
7274
},
7375
computed: {
7476
allowed () {
@@ -130,7 +132,7 @@ export default {
130132
fetchOsCategoryIdIfNeeded () {
131133
const needed = this.allowed &&
132134
'listOsTypes' in this.$store.getters.apis &&
133-
this.resource && this.resource.ostypeid &&
135+
!!this.resource && !!this.resource.ostypeid &&
134136
(this.$config.imageSelectionInterface === undefined ||
135137
this.$config.imageSelectionInterface === 'modern')
136138
if (!needed) {

0 commit comments

Comments
 (0)