bernardodemarco commented on code in PR #10455:
URL: https://github.com/apache/cloudstack/pull/10455#discussion_r1976096899
##########
ui/src/views/storage/CreateTemplate.vue:
##########
@@ -300,21 +301,24 @@ export default {
this.handleDomainChange(null)
})
},
- handleDomainChange (domain) {
+ async handleDomainChange (domain) {
this.domainid = domain
this.form.account = null
this.account = null
if ('listAccounts' in this.$store.getters.apis) {
- this.fetchAccounts()
+ await this.fetchAccounts()
}
},
fetchAccounts () {
- api('listAccounts', {
- domainid: this.domainid
- }).then(response => {
- this.accounts = response.listaccountsresponse.account || []
- }).catch(error => {
- this.$notifyError(error)
+ return new Promise((resolve, reject) => {
+ api('listAccounts', {
+ domainid: this.domainid
+ }).then(response => {
+ this.accounts = response.listaccountsresponse.account || []
Review Comment:
```suggestion
this.accounts = response?.listaccountsresponse?.account || []
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]