git ssb

16+

Dominic / patchbay



Commit d006827557e63f5aabd07e480b910ca50ddb9646

fix isChannelsMulti checker so it truely only catches multi-channels

mixmix committed on 1/29/2019, 4:52:34 AM
Parent: f7f9b2da6755169cd95d16493b7f3ef304787046

Files changed

app/page/channels.jschanged
router/async/normalise.jschanged
app/page/channels.jsView
@@ -39,9 +39,8 @@
3939 }
4040 ),
4141 pull.unique(m => m.key)
4242 )
43-
4443
4544 pull(
4645 Source({ old: false }),
4746 filterUpThrough(),
router/async/normalise.jsView
@@ -43,9 +43,12 @@
4343 }
4444 }
4545
4646 function isChannelMulti (str) {
47- return typeof str === 'string' && str.split('+').every(isChannel)
47 + if (typeof str !== 'string') return false
48 +
49 + const channels = str.split('+')
50 + return channels.length > 1 && channels.every(isChannel)
4851 }
4952
5053 function isChannel (str) {
5154 return typeof str === 'string' && str[0] === '#' && str.length > 1

Built with git-ssb-web