Steps to replicate the issue (include links if applicable):
- Make a revision that includes complex changes to HTML (example)
- Attempt to view that revision using VisualDiff
What happens?:
The following error throws (example).
. . . Cannot read properties of undefined (reading 'type') at ve.dm.Model.static.isDiffComparable . . .
What should have happened instead?:
A visual diff of the revision should render (example).
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
- MediaWiki 1.39.4
- MediaWiki 1.43.0
Other information (browser name/version, screenshots, etc.):
Early returning false from ve.dm.Model.static.isDiffComparable when element, other, or type is undefined appears to resolve the issue. As a workaround, it's confirmed working for the *What should have happened* example.