From 90b36d829fdde17263faffec9e3d68dbf887fa20 Mon Sep 17 00:00:00 2001 From: Peder Johnsen Date: Sat, 23 Mar 2019 21:13:02 +0000 Subject: [PATCH] Get skinToneIndex from forEach function --- src/utils/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/index.js b/src/utils/index.js index 37055af..2e1dcfa 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -150,9 +150,8 @@ function getEmojiDataFromNative(nativeString, set, data) { let skinCode let baseNativeString = nativeString - skinTones.forEach((skinTone) => { + skinTones.forEach((skinTone, skinToneIndex) => { if (nativeString.indexOf(skinTone) > 0) { - const skinToneIndex = skinTones.indexOf(skinTone) skin = skinToneIndex + 2 skinCode = skinCodes[skinToneIndex] }