diff mbox series

Toaster: Fixed javascript issue on tests.browser.test_js_unit_tests

Message ID 20231016165236.344517-1-alassane.yattara@savoirfairelinux.com
State New
Headers show
Series Toaster: Fixed javascript issue on tests.browser.test_js_unit_tests | expand

Commit Message

Alassane Yattara Oct. 16, 2023, 4:52 p.m. UTC
- Update /toastergui/static/js/projectpage.js to fix following
javascript issue that make fail test_js_unit_tests.
Uncaught TypeError: Cannot read properties of null (reading 'name')

Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/toastergui/static/js/projectpage.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/toaster/toastergui/static/js/projectpage.js b/lib/toaster/toastergui/static/js/projectpage.js
index 506471e0..a3c95810 100644
--- a/lib/toaster/toastergui/static/js/projectpage.js
+++ b/lib/toaster/toastergui/static/js/projectpage.js
@@ -61,7 +61,7 @@  function projectPageInit(ctx) {
         distroChangeInput.val(urlParams.setDistro);
         distroChangeBtn.click();
     } else {
-      updateDistroName(prjInfo.distro.name);
+      updateDistroName(prjInfo.distro?.name);
     }
 
    /* Now we're really ready show the page */