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

TypeError on delete or show usage action in select file popup for deleted documents #6481

Open
komarovartem opened this issue Apr 25, 2024 · 1 comment

Comments

@komarovartem
Copy link

komarovartem commented Apr 25, 2024

Describe the bug

When trying to show usage or delete file from Select file popup crashes with TypeError: Cannot read properties of undefined (reading 'icon')

To Reproduce

  1. add custom schema document "Projects"
  2. add field with type file to "Projects" schema
  3. upload file
  4. delete schema files for "Projects"
  5. on any other document for example "Page" add type file to schema
  6. click Browse button inside that field
  7. on any uploaded files for "Projects" file click Show More button
  8. click Delete or Show Usage.
  9. See error

Expected behavior

Pop up with text "document of the unknown type project"

Which versions of Sanity are you using?

3.39.0

What operating system are you using?

MacOS

Which versions of Node.js / npm are you running?

v20.4.0

@komarovartem komarovartem changed the title TypeError on delete or show usage action in select file popup TypeError on delete or show usage action in select file popup for deleted documents Apr 26, 2024
@juice49
Copy link
Contributor

juice49 commented May 7, 2024

Hi Artem. Thank you for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants