Fix: file-sharing Seite crasht wenn parameters undefined
samba.parameters?.map() statt .map() direkt — API kann parameters weglassen ohne einen Fehler zu werfen. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ export default function FileSharingPage() {
|
|||||||
const samba = await api.getSambaConfig().catch(() => ({ parameters: [] }))
|
const samba = await api.getSambaConfig().catch(() => ({ parameters: [] }))
|
||||||
|
|
||||||
// Convert parameters array to key=value format
|
// Convert parameters array to key=value format
|
||||||
const sambaStr = samba.parameters
|
const sambaStr = (samba.parameters ?? [])
|
||||||
.map((p: any) => `${p.key} = ${p.value}`)
|
.map((p: any) => `${p.key} = ${p.value}`)
|
||||||
.join("\n")
|
.join("\n")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user