musicbrainz-server
musicbrainz-server copied to clipboard
MBS-13538: Removing all rows in the artist credit editor makes it disappear
Problem
See the description / animated GIF in MBS-13538.
Solution
Moving the firstNameAutocomplete
assignment to prevent executing newNames[0].artist
on an array of length 0 is sufficient to fix the bug. However, I also made it so that you can't remove the last remaining (non-removed) AC name row; instead, clicking the remove button will simply clear it.
Testing
Tested manually, plus added a Selenium test.