`"${current:="$next"}"`

would get rid of the previous if block as well.  You can also combine that with the previous if block.