Steps to replicate the issue (include links if applicable):
- Go to a file page (bug confirmed at least for user page too
- Edit the page with the Visual Editor
- Save the pahe
What happens?:
- The page is saved
- An JavaScript error popped up and is shown in the Firefix console
What should have happened instead?:
No error should pop up
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
This happens since the last deployment of the train to 1.46.0-wmf.7


