From 2d05276dc477c7407d439e64015cc97d83b19e96 Mon Sep 17 00:00:00 2001 From: Etienne Lemay Date: Mon, 18 Jul 2016 14:23:28 -0400 Subject: [PATCH] Fix tokenization of +1/-1 emojis --- src/utils/emoji-index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/emoji-index.js b/src/utils/emoji-index.js index bbf10bc..bb41c31 100644 --- a/src/utils/emoji-index.js +++ b/src/utils/emoji-index.js @@ -37,8 +37,8 @@ function search(value, maxResults = 75) { return results } -function tokenize (string) { - if (['-', '-1', '+', '+1'].indexOf(string) == 0) { +function tokenize (string = '') { + if (string[0] == '-' || string[0] == '+') { return string.split('') }