You're missing a pair of cases if you do it that way round. Check the original version here : https://github.com/CoryChaplin/KiwiIRC/blob/73ddddf00f393afa023a34029e9deaaf214e4459/client/src/applets/chanlist.js#L108

I've done the shorthand style switch.