Explorar o código

fixed the selection of the correct label name

Dimitri Korsch %!s(int64=3) %!d(string=hai) anos
pai
achega
fb01307b99
Modificáronse 1 ficheiros con 9 adicións e 2 borrados
  1. 9 2
      webui/src/components/media/cropped-image.vue

+ 9 - 2
webui/src/components/media/cropped-image.vue

@@ -51,8 +51,15 @@
             if (this.box.label_id == null)
               return 'Unknown'
 
-            var label = this.labels[this.box.label_id]
-            return label.name
+            let name = 'Not Found';
+            for (let label of this.labels){
+              if (label.id != this.box.label_id)
+                continue;
+
+              name = label.name;
+              break;
+            }
+            return name
           },
 
         },