JavaScript (ES6), 67 bytes
f=([c,...a])=>c?c+f([...a.splice(0,a.indexOf(c)).reverse(),...a]):a
How?
a.splice(0, n)
removes and returns the first \$n\$ entries in a[]
if \$n\ge1\$ or removes nothing and returns an empty array if \$n<1\$. If c
is not found in a[]
, a.indexOf(c)
returns \$-1\$ and we just pass a[]
unchanged to the next iteration.