diff --git a/components/builder-helper.js b/components/builder-helper.js index 6f20859..777e6ce 100644 --- a/components/builder-helper.js +++ b/components/builder-helper.js @@ -11,14 +11,14 @@ export default ({ badgeURL, onSelect }) => { return eg.find(str => str.includes(badgeURL)) }) - const hints = matched.length === 1 && matched[0][1] === badgeURL ? [] : matched + const hints = matched.length === 1 && matched[0][1] === '/' + badgeURL ? [] : matched return (
{ hints.length ? ( { hints.map(eg => ( - onSelect(eg[1])} /> + onSelect(eg[1].replace(/^\//, ''))} /> )) }
) : (