In VE, select and delete any gallery, e.g. https://en.wikipedia.org/w/index.php?title=Claude_Monet&veaction=edit§ion=5
Observe an exception is thrown here:
ve.ce.MWGalleryNode.prototype.onUpdate = function () { const mwAttrs = this.model.getAttribute( 'mw' ).attrs;
TypeError: Cannot read properties of null (reading 'getAttribute')