Fix TypeError on emoji click when picker has been unmounted [Fix #126]
`isMounted` is being deprecated, so we test against scroll ref being definedrelease
parent
00e5df4103
commit
922ae30a0f
|
@ -189,6 +189,7 @@ export default class Picker extends React.Component {
|
||||||
component.forceUpdate()
|
component.forceUpdate()
|
||||||
|
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
|
if (!this.scroll) return
|
||||||
component.memoizeSize()
|
component.memoizeSize()
|
||||||
if (maxMargin == component.maxMargin) return
|
if (maxMargin == component.maxMargin) return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue