Commit d006827557e63f5aabd07e480b910ca50ddb9646
fix isChannelsMulti checker so it truely only catches multi-channels
mixmix committed on 1/29/2019, 4:52:34 AMParent: f7f9b2da6755169cd95d16493b7f3ef304787046
Files changed
app/page/channels.js | changed |
router/async/normalise.js | changed |
app/page/channels.js | ||
---|---|---|
@@ -39,9 +39,8 @@ | ||
39 | 39 … | } |
40 | 40 … | ), |
41 | 41 … | pull.unique(m => m.key) |
42 | 42 … | ) |
43 | - | |
44 | 43 … | |
45 | 44 … | pull( |
46 | 45 … | Source({ old: false }), |
47 | 46 … | filterUpThrough(), |
router/async/normalise.js | ||
---|---|---|
@@ -43,9 +43,12 @@ | ||
43 | 43 … | } |
44 | 44 … | } |
45 | 45 … | |
46 | 46 … | 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) | |
48 | 51 … | } |
49 | 52 … | |
50 | 53 … | function isChannel (str) { |
51 | 54 … | return typeof str === 'string' && str[0] === '#' && str.length > 1 |
Built with git-ssb-web