diff --git a/webapp/src/components/PinInfo.vue b/webapp/src/components/PinInfo.vue
index bb1400356..af7e788cd 100644
--- a/webapp/src/components/PinInfo.vue
+++ b/webapp/src/components/PinInfo.vue
@@ -17,11 +17,11 @@
{{ capitalizeFirstLetter(category) }}
{{ prop }} |
-
+
{{ (selectedPinAssignment as any)[category][prop] }}
|
-
+
{{ (currentPinAssignment as any)[category][prop] }}
|
@@ -65,12 +65,12 @@ export default defineComponent({
methods: {
properties(category: string): string[] {
let curArray: Array = [];
- if ((this.currentPinAssignment as Device)[category as keyof Device]) {
+ if (this.currentPinAssignment && category in this.currentPinAssignment) {
curArray = Object.keys((this.currentPinAssignment as Device)[category as keyof Device]);
}
let selArray: Array = [];
- if ((this.selectedPinAssignment as Device)[category as keyof Device]) {
+ if (this.selectedPinAssignment && category in this.selectedPinAssignment) {
selArray = Object.keys((this.selectedPinAssignment as Device)[category as keyof Device]);
}
@@ -83,10 +83,10 @@ export default defineComponent({
let comSel = 999999;
let comCur = 999999;
- if ((this.selectedPinAssignment as Device)[category as keyof Device]) {
+ if (this.selectedPinAssignment && category in this.selectedPinAssignment) {
comSel = (this.selectedPinAssignment as any)[category][prop];
}
- if ((this.currentPinAssignment as Device)[category as keyof Device]) {
+ if (this.currentPinAssignment && category in this.currentPinAssignment) {
comCur = (this.currentPinAssignment as any)[category][prop];
}