Get skinToneIndex from forEach function
parent
0ab34e20a3
commit
90b36d829f
|
@ -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]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue