mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Defensive check (#578)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
7faed91d53
commit
3ced416660
@ -748,11 +748,10 @@ export default {
|
||||
if (res === 'count') {
|
||||
continue
|
||||
}
|
||||
const filter = this.currentAction.mapping[param.name].filter
|
||||
if (filter) {
|
||||
param.opts = json[obj][res]
|
||||
if (this.currentAction.mapping[param.name] && this.currentAction.mapping[param.name].filter) {
|
||||
const filter = this.currentAction.mapping[param.name].filter
|
||||
param.opts = json[obj][res].filter(filter)
|
||||
} else {
|
||||
param.opts = json[obj][res]
|
||||
}
|
||||
if (['listTemplates', 'listIsos'].includes(possibleApi)) {
|
||||
param.opts = [...new Map(param.opts.map(x => [x.id, x])).values()]
|
||||
@ -764,7 +763,7 @@ export default {
|
||||
}
|
||||
this.$forceUpdate()
|
||||
}).catch(function (error) {
|
||||
console.log(error.stack)
|
||||
console.log(error)
|
||||
param.loading = false
|
||||
}).then(function () {
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user