From 49ed26bea2e00a61c0bd9d64d08466f265e612f6 Mon Sep 17 00:00:00 2001
From: dcz <dcz@ipipan.waw.pl>
Date: Thu, 9 Nov 2023 12:04:13 +0100
Subject: [PATCH] this.selectedLus.length > 0 bugfix.

---
 frontend/src/components/unification/free_lu/FreeLuEdit.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frontend/src/components/unification/free_lu/FreeLuEdit.vue b/frontend/src/components/unification/free_lu/FreeLuEdit.vue
index 3ee5dd6..5988eb6 100644
--- a/frontend/src/components/unification/free_lu/FreeLuEdit.vue
+++ b/frontend/src/components/unification/free_lu/FreeLuEdit.vue
@@ -207,7 +207,7 @@
             },
             attach_examples() {
                 if (this.frame_in_progress) {
-                    if (this.selectedLus) {
+                    if (this.selectedLus && this.selectedLus.length > 0) {
                         const examplesSelect = function () {
                             return '<div class="attach-examples-table-wrapper-scroll-y attach-examples-custom-scrollbar"><table id="attach-examples" class="table table-bordered table-striped mb-0"><thead><tr class="font-weight-bold"><th></th><th>Zdanie</th><th>Źródło</th><th>Opinia</th></tr></thead>' + this.examples.map(example => {
                                 return `<tr><td><input type="checkbox" ${this.selectedLus && example.lu_ids.includes(this.selectedLus[0].id)  ? 'checked' : ''} name="lus" value="${example.id}" /></td><td>${example.sentence}</td><td>${example.source}</td><td>${example.opinion}</td></tr>`;
-- 
GitLab