Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Exception thrown when loading file array in relation display name #1989

Closed
mjadobson opened this issue Mar 6, 2023 · 1 comment
Closed

Comments

@mjadobson
Copy link
Contributor

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.

@ganigeorgiev
Copy link
Member

Thank you. I've pushed a fix in master and it will be available with the next minor v0.13.2 release sometime later this week.

abdokhaire pushed a commit to abdokhaire/postgresbase that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants