This is cruft code in all but the `type === 'change'` case, so should be in that `case` block.