Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix emoji.id undefined error #289

Merged
merged 1 commit into from
Mar 12, 2019

Conversation

nolanlawson
Copy link

fixes #201

Steps to reproduce:

  1. Open the storybook
  2. Type some text that results in "not found"
  3. Press enter
  4. Check the dev console for the error

The error is:

Uncaught TypeError: Cannot read property 'id' of undefined
    at getData (index.js:99)
    at getSanitizedData (index.js:73)
    at NimblePicker.handleKeyDown (nimble-picker.js:476)
    at HTMLUnknownElement.callCallback (react-dom.development.js:1299)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:1338)
    at Object.invokeGuardedCallback (react-dom.development.js:1195)
    at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:1209)
    at executeDispatch (react-dom.development.js:1432)
    at Object.executeDispatchesInOrder (react-dom.development.js:1454)
    at executeDispatchesAndRelease (react-dom.development.js:1969)

This happens when the search list is empty. Checking the .length of the list fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NimblePicker: Cannot read property 'id' of undefined
1 participant