From 0678068696f4693aa4bb0996bd5e851aa3a19567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 24 Mar 2025 10:10:48 +0000 Subject: [PATCH 1/2] fix(web): handle empty list of unsupported elements --- web/src/components/questions/UnsupportedAutoYaST.test.tsx | 4 ++-- web/src/components/questions/UnsupportedAutoYaST.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/questions/UnsupportedAutoYaST.test.tsx b/web/src/components/questions/UnsupportedAutoYaST.test.tsx index 1f9845b9ee..a2c40c58d3 100644 --- a/web/src/components/questions/UnsupportedAutoYaST.test.tsx +++ b/web/src/components/questions/UnsupportedAutoYaST.test.tsx @@ -63,7 +63,7 @@ describe("UnsupportedAutoYaST", () => { describe("when there are no unsupported (but planned) elements", () => { beforeEach(() => { - mockQuestion = { ...question, data: {} }; + mockQuestion = { ...question, data: { planned: "" } }; }); it('does not render the "Not implemented yet" list', () => { @@ -75,7 +75,7 @@ describe("UnsupportedAutoYaST", () => { describe("when there are no unsupported (but planned) elements", () => { beforeEach(() => { - mockQuestion = { ...question, data: {} }; + mockQuestion = { ...question, data: { unsupported: "" } }; }); it('does not render the "Not supported" list', () => { diff --git a/web/src/components/questions/UnsupportedAutoYaST.tsx b/web/src/components/questions/UnsupportedAutoYaST.tsx index 6136b27d64..5a8b7dade2 100644 --- a/web/src/components/questions/UnsupportedAutoYaST.tsx +++ b/web/src/components/questions/UnsupportedAutoYaST.tsx @@ -74,8 +74,8 @@ export default function UnsupportedAutoYaST({ answerCallback(question); }; - const planned = question.data.planned?.split(",") || []; - const unsupported = question.data.unsupported?.split(",") || []; + const planned = question.data.planned ? question.data.planned.split(",") : []; + const unsupported = question.data.unsupported ? question.data.unsupported.split(",") : []; return ( From 14991e530ac079f8c34baf030a200cc3d49be16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Mon, 24 Mar 2025 10:18:11 +0000 Subject: [PATCH 2/2] docs(web): update changes file --- web/package/agama-web-ui.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 9225b5d338..bae0dff1cb 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 24 10:17:30 UTC 2025 - Imobach Gonzalez Sosa + +- Properly handle empty lists of unsupported AutoYaST elements + (gh#agama-project/agama#2196). + ------------------------------------------------------------------- Thu Mar 20 20:58:44 UTC 2025 - David Diaz