fix: admin/options: not displaying warning on proxies

Massimo Melina committed Mar 23, 2025 at 12:25 UTC 31b4e0b9daa487f54ba01cc72ceb0025985602d7
1 file changed +2 -2
admin/src/HomePage.ts
+2 -2
@@ -87,7 +87,7 @@ export default function HomePage() {
87 : entry('', md("This is the Admin-panel, where you manage your server. Access your files on "),
88 h(Link, { target:'frontend', href: '../..' }, "Front-end", h(Launch, { sx: { verticalAlign: 'sub', ml: '.2em' } }))),
89
90 - with_(proxyWarning(cfg, status), x => x && entry('warning', x,
90 + with_(proxyWarning(cfg.data, status), x => x && entry('warning', x,
91 SOLUTION_SEP, cfgLink("set the number of proxies"),
92 SOLUTION_SEP, "unless you are sure and you can ", h(Btn, {
93 variant: 'outlined',
@@ -235,6 +235,6 @@ function cfgLink(text=`Options page`) {
235 }
236
237 export function proxyWarning(cfg: any, status: any) {
238 - return cfg.data && !cfg.data.proxies && status?.proxyDetected
238 + return cfg && !cfg.proxies && status?.proxyDetected
239 ? "A proxy was detected but none is configured" : ''
240 }