git ssb

16+

Dominic / patchbay



Commit e37288c1eddd72e5d911ccbc966d5b58020827c8

Fix prefix logic for link handler

Double negatives have fooled me again!

- Before: "if there aren't any prefixes which aren't the link prefix"
- After: "if every prefix is not the link prefix"
Christian Bundy committed on 1/17/2019, 11:35:28 PM
Parent: de24e594e99f9352ee3679a960c1a20af79c6882

Files changed

app/html/search-bar.jschanged
app/html/search-bar.jsView
@@ -21,9 +21,9 @@
2121 const prefixes = ['@', '#', '%', '&', '/', 'ssb:']
2222
2323 if (location[0] === '?') {
2424 location = { page: 'search', query: location.substring(1) }
25- } else if (prefixes.some(p => !location.startsWith(p)) === false) {
25 + } else if (prefixes.every(p => !location.startsWith(p))) {
2626 location = { page: 'search', query: location }
2727 }
2828
2929 api.app.sync.goTo(location)

Built with git-ssb-web