Handle double hashtag channel names in URLs

This commit is contained in:
khlieng 2015-02-22 09:51:06 +01:00
parent 518a530f43
commit 2f1e72876b
4 changed files with 38 additions and 8 deletions

View file

@ -8,7 +8,10 @@ var tabActions = Reflux.createActions([
tabActions.select.preEmit = (server, channel) => {
if (channel) {
routeActions.navigate('/' + server + '/' + channel.slice(1))
while (channel[0] === '#') {
channel = channel.slice(1);
}
routeActions.navigate('/' + server + '/' + channel);
} else {
routeActions.navigate('/' + server);
}