From 1a7ebf3245d49aa724af5ba430ddab6696a151b6 Mon Sep 17 00:00:00 2001 From: Amio Date: Thu, 18 Oct 2018 17:07:09 +0800 Subject: [PATCH] web: fix builder input with slash --- components/builder-helper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(/^\//, ''))} /> )) }
) : (