kopia lustrzana https://github.com/badgen/badgen.net
web: fix builder input with slash
rodzic
6d1bc83fcc
commit
1a7ebf3245
|
@ -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 (
|
||||
<div className='wrapper'>
|
||||
{ hints.length ? (
|
||||
<table><tbody>
|
||||
{ hints.map(eg => (
|
||||
<Hint key={eg[1]} info={eg} onSelect={e => onSelect(eg[1])} />
|
||||
<Hint key={eg[1]} info={eg} onSelect={e => onSelect(eg[1].replace(/^\//, ''))} />
|
||||
)) }
|
||||
</tbody></table>
|
||||
) : (
|
||||
|
|
Ładowanie…
Reference in New Issue