webapp: Fix error in device manager if no config was available
This commit is contained in:
parent
19b42223f5
commit
8377d5bb73
@ -91,15 +91,17 @@ export default defineComponent({
|
|||||||
.then(
|
.then(
|
||||||
(data) => {
|
(data) => {
|
||||||
this.pinMappingList = data;
|
this.pinMappingList = data;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.catch(() => {
|
||||||
|
this.pinMappingList = Array<Device>();
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
this.pinMappingList.push({
|
this.pinMappingList.push({
|
||||||
"name": this.$t('deviceadmin.DefaultProfile')
|
"name": this.$t('deviceadmin.DefaultProfile')
|
||||||
} as Device);
|
} as Device);
|
||||||
this.pinMappingList.sort((a, b) => (a.name < b.name) ? -1 : 1);
|
this.pinMappingList.sort((a, b) => (a.name < b.name) ? -1 : 1);
|
||||||
this.pinMappingLoading = false;
|
this.pinMappingLoading = false;
|
||||||
}
|
|
||||||
)
|
|
||||||
.catch(() => {
|
|
||||||
this.pinMappingLoading = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDeviceConfig() {
|
getDeviceConfig() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user