Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4a336f2

Browse files
committedOct 31, 2024··
expose state transition on provided
1 parent a503045 commit 4a336f2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎src/FlagProvider.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ const offlineConfig: IConfig = {
2525
const _startTransition = 'startTransition';
2626
// fallback for React <18 which doesn't support startTransition
2727
// Fallback for React <18 and exclude startTransition if in React Native
28-
const defaultStartTransition: (fn: () => void) => void = React[_startTransition]
29-
? React[_startTransition]
30-
: (fn => fn());
28+
const defaultStartTransition = React[_startTransition] || (fn => fn());
3129

3230
const FlagProvider: FC<PropsWithChildren<IFlagProvider>> = ({
3331
config: customConfig,

0 commit comments

Comments
 (0)
Please sign in to comment.