Fix TypeError on emoji click when picker has been unmounted [Fix #126]

`isMounted` is being deprecated, so we test against scroll ref being defined
nolan/hinaloe-test
Etienne Lemay 2017-09-29 19:14:24 -04:00
parent 00e5df4103
commit 922ae30a0f
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ export default class Picker extends React.Component {
component.forceUpdate()
window.requestAnimationFrame(() => {
if (!this.scroll) return
component.memoizeSize()
if (maxMargin == component.maxMargin) return