From 6c5d8270c0688825db204d1a9d1528e798fdad19 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 24 Oct 2019 13:30:01 +0200 Subject: [PATCH] :art: change removeFirstChar --- components/Search.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/Search.vue b/components/Search.vue index a475faf..0ac6429 100644 --- a/components/Search.vue +++ b/components/Search.vue @@ -15,7 +15,10 @@ export default { watch: { searchInput(input) { const isTag = R.startsWith('#') - const removeFirstChar = x => R.splitAt(1, x)[1] + const removeFirstChar = R.compose( + R.join(''), + R.adjust(0, () => '') + ) const words = R.filter(isNotEmpty, R.split(' ', input)) const tags = R.filter(isTag, words)