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

[MediaLib] TypeError: Cannot convert undefined or null to object #13

Closed
lkho opened this issue Jun 16, 2022 · 0 comments · Fixed by #14
Closed

[MediaLib] TypeError: Cannot convert undefined or null to object #13

lkho opened this issue Jun 16, 2022 · 0 comments · Fixed by #14

Comments

@lkho
Copy link
Contributor

lkho commented Jun 16, 2022

When an image is too small and does not have responsive formats generated, asset.formats is null.

let keys = Object.keys(asset.formats).sort((a, b) => {

fix:
add a check in the iabove if statement:

if (asset.formats?.length && uploadCfg?.responsiveDimensions) {
lkho added a commit to lkho/strapi-plugin-ckeditor that referenced this issue Jun 16, 2022
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

Successfully merging a pull request may close this issue.

1 participant