Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit 03f0f7a

Browse files
authored
Defensive check (#578)
1 parent 342fd63 commit 03f0f7a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/views/AutogenView.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,11 +748,10 @@ export default {
748748
if (res === 'count') {
749749
continue
750750
}
751-
const filter = this.currentAction.mapping[param.name].filter
752-
if (filter) {
751+
param.opts = json[obj][res]
752+
if (this.currentAction.mapping[param.name] && this.currentAction.mapping[param.name].filter) {
753+
const filter = this.currentAction.mapping[param.name].filter
753754
param.opts = json[obj][res].filter(filter)
754-
} else {
755-
param.opts = json[obj][res]
756755
}
757756
if (['listTemplates', 'listIsos'].includes(possibleApi)) {
758757
param.opts = [...new Map(param.opts.map(x => [x.id, x])).values()]
@@ -764,7 +763,7 @@ export default {
764763
}
765764
this.$forceUpdate()
766765
}).catch(function (error) {
767-
console.log(error.stack)
766+
console.log(error)
768767
param.loading = false
769768
}).then(function () {
770769
})

0 commit comments

Comments
 (0)