yonahforst/react-native-emoji-picker

error conversion of utf to emoji

joaomarcoscmaciel opened this issue · 2 comments

Hello yonahforst,

I'm getting an error of: undefined is not an object (evaluating 'String.fromCodePoint.apply')
The error directs to the line 37 of index.js:
const charFromUtf16 = utf16 => String.fromCodePoint(...utf16.split('-').map(u => '0x' + u))

Can you help me?

Thanks in advance.

@joaomarcoscmaciel - which version of emoji-datasource did npm install? i dont think that's it. which version of node are you running?

maybe you can see which codepoint if failing:

const charFromUtf16 = utf16 => {
  console.log(utf16)
  return String.fromCodePoint(...utf16.split('-').map(u => '0x' + u))
}

closing due to inactivity