Skip to content

Runtime error on editing asset details. #230

@shahanshaada

Description

@shahanshaada

Unhandled Runtime error on editing asset details from meatball menu option “Media” for images that are within an array/block.

Error: Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a image that is inside a block/array in sanity.
  2. From the meatball menu, select "Media"
  3. Select the image you just uploaded.
  4. Add/edit any field in Asset details of that image.
  5. Click "Save and Close

Expected behavior
Expected behavior is to get the details saved, but instead sanity crashes and shows the above error.

Screenshots
image (3)
image (4)
Below is the error with latest sanity media plugin version:
image (2)

Plugin and environment information:

  • "sanity-plugin-media": "^2.3.2"
  • "sanity": "^3.47.1",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions