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

.tiff files cause error on refresh #2535

Closed
karmatosed opened this issue Aug 25, 2017 · 2 comments · Fixed by #2840
Closed

.tiff files cause error on refresh #2535

karmatosed opened this issue Aug 25, 2017 · 2 comments · Fixed by #2840
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended

Comments

@karmatosed
Copy link
Member

To reproduce:

  • Click image block
  • Add a .tiff file
  • Nothing shows
  • Refresh
  • This shows:

2017-08-25 at 12 29

@karmatosed karmatosed added [Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended labels Aug 25, 2017
@aduth
Copy link
Member

aduth commented Aug 25, 2017

Uncaught TypeError: Cannot convert undefined or null to object

The issue is that we expect the media item to return a media_details.sizes object on the API return value:

this.fetchImageRequest.then( ( image ) => {
this.setState( {
availableSizes: image.media_details.sizes,
} );
} );

In the case of a TIFF image, the media_details property is an empty object, so availableSizes state is assigned as undefined.

@karmatosed
Copy link
Member Author

@aduth can we do something to catch this for .tiff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants