List importable domain: in case of null response, consider empty array instead

This commit is contained in:
nemunaire 2021-01-14 03:02:10 +01:00
parent ef49cccb93
commit 518775341e

View File

@ -171,7 +171,13 @@ export default {
SourcesApi.listSourceDomains(this.source._id)
.then(
response => (this.importableDomains = response.data),
response => {
if (response.data === null) {
this.importableDomains = []
} else {
this.importableDomains = response.data
}
},
error => {
this.$root.$bvToast.toast(
error.response.data.errmsg, {