@samitouri / QOSami-HFS / commits / bd9882d3

fix: plugin/list-uploader: possible UI crash

Massimo Melina committed Apr 5, 2026 at 11:48 UTC bd9882d3ab3a72698b9d00e05a10299b04f473ab
2 files changed +2 -2
plugins/list-uploader/public/main.js
+1 -1
@@ -10,7 +10,7 @@
10 const text = React.useMemo(() => {
11 if (!data || data === true) return ''
12 const { upload: x } = data
13 - const shouldShowIpWithUser = display === 'ip+user' && x.ip || display === 'tooltip' && HFS.state.adminUrl
13 + const shouldShowIpWithUser = display === 'ip+user' && x?.ip || display === 'tooltip' && HFS.state.adminUrl
14 return !x ? ''
15 : display === 'user' ? x.username
16 : display === 'ip' || !x.username && shouldShowIpWithUser ? x.ip
src/frontEndApis.ts
+1 -1
@@ -52,7 +52,7 @@ export const frontEndApis: ApiHandlers = {
52 if (!node || !hasPermission(node, 'can_see', ctx))
53 return false
54 let upload = node.source && await getUploadMeta(node.source).catch(() => undefined)
55 - if (!upload) return false
55 + if (!upload) return
56 if (!isAdmin)
57 upload = _.omit(upload, 'ip')
58 return { upload }