Skip to content

Commit

Permalink
fix(useMultipleSelection): do not crash in react native (#1479)
Browse files Browse the repository at this point in the history
  • Loading branch information
silviuaavram authored Mar 8, 2023
1 parent e97c368 commit 8c903c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useMultipleSelection/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useRef, useEffect, useCallback, useMemo} from 'react'
import {isReactNative} from '../../is.macro'
import setStatus from '../../set-a11y-status'
import {handleRefs, callAllEventHandlers, normalizeArrowKey} from '../../utils'
import {
Expand Down Expand Up @@ -53,7 +54,7 @@ function useMultipleSelection(userProps = {}) {
// Effects.
/* Sets a11y status message on changes in selectedItem. */
useEffect(() => {
if (isInitialMountRef.current) {
if (isInitialMountRef.current || isReactNative) {
return
}

Expand Down

0 comments on commit 8c903c3

Please sign in to comment.