From 2c477cd5c9974da38f7ee82d6b91cea4fec22a41 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 5 Jun 2026 00:39:43 +0200 Subject: [PATCH] Fix: file-sharing Seite crasht wenn parameters undefined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit samba.parameters?.map() statt .map() direkt — API kann parameters weglassen ohne einen Fehler zu werfen. Co-Authored-By: Claude Sonnet 4.6 --- frontend/app/file-sharing/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/file-sharing/page.tsx b/frontend/app/file-sharing/page.tsx index 6384c6f..11cbde7 100644 --- a/frontend/app/file-sharing/page.tsx +++ b/frontend/app/file-sharing/page.tsx @@ -43,7 +43,7 @@ export default function FileSharingPage() { const samba = await api.getSambaConfig().catch(() => ({ parameters: [] })) // Convert parameters array to key=value format - const sambaStr = samba.parameters + const sambaStr = (samba.parameters ?? []) .map((p: any) => `${p.key} = ${p.value}`) .join("\n")