[Bug]: Exception thrown when loading file array in relation display name #1989
Closed
Description
Reproduced on https://pocketbase.io/demo/ (0.13.1):
Setup:
TableA
has file field files
that allows multiple files
TableA
has one or more records where files
contains multiple files
TableB
sets up relation to TableA
, in the display fields setting, files
is included.
When these rows are viewed in UI, this error is thrown:
Uncaught (in promise) TypeError: e.toLowerCase is not a function
at index-c7ee28f0.js:4:125048
at Array.find (<anonymous>)
at H.hasImageExtension (index-c7ee28f0.js:4:125038)
at H.getFileType (index-c7ee28f0.js:4:125337)
at n.$$.update (index-c7ee28f0.js:120:40804)
at ve (index-c7ee28f0.js:4:7806)
at new iu (index-c7ee28f0.js:120:40998)
at yp (index-c7ee28f0.js:120:50055)
at kp (index-c7ee28f0.js:120:50355)
at DM (index-c7ee28f0.js:120:50739)
This is because hasImageExtension()
is receiving an array (of file ids), not a string as expected.
Metadata
Assignees
Labels
No labels