Get skinToneIndex from forEach function

release
Peder Johnsen 2019-03-23 21:13:02 +00:00
parent 0ab34e20a3
commit 90b36d829f
1 changed files with 1 additions and 2 deletions

View File

@ -150,9 +150,8 @@ function getEmojiDataFromNative(nativeString, set, data) {
let skinCode let skinCode
let baseNativeString = nativeString let baseNativeString = nativeString
skinTones.forEach((skinTone) => { skinTones.forEach((skinTone, skinToneIndex) => {
if (nativeString.indexOf(skinTone) > 0) { if (nativeString.indexOf(skinTone) > 0) {
const skinToneIndex = skinTones.indexOf(skinTone)
skin = skinToneIndex + 2 skin = skinToneIndex + 2
skinCode = skinCodes[skinToneIndex] skinCode = skinCodes[skinToneIndex]
} }