[Bug] rendering images after updating prosemirror-model to 1.25.12 fails when image has no caption
Author: atsjoCreated Sep 27, 2026Updated Sep 27, 2026
Labelsbug
Initial checklist
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected packages and versions
7.22.2
Link to runnable example
No response
Steps to reproduce
I can see that the lockfile in this repo uses prosemirror-model 1.25.11... Updating prosemirror-model and prosemirror-view to latest and then pasting
into the playground should reveal the error
Expected behavior
Image visible without caption, as when using prosemirror-model 1.25.11
Actual behavior
No image and error in console:
RangeError: Expected value of type string for attribute caption on type image-block, got nullRuntime
Chrome
OS
Windows
Build and bundle tools
esbuild
Source: Milkdown/milkdown