Skip to content

Commit 420c9f7

Browse files
committed
fix commit
1 parent ba9081f commit 420c9f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/src/provider/use-context-mutator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useContext } from 'react';
1+
import { useCallback, useContext, useRef } from 'react';
22
import { OpenFeature, EvaluationContext } from '@openfeature/web-sdk';
33
import { Context } from './context';
44

@@ -9,7 +9,7 @@ import { Context } from './context';
99
*/
1010
export function useContextMutator() {
1111
const { domain } = useContext(Context) || {};
12-
const previousContext = useRef(null);
12+
const previousContext = useRef<null | EvaluationContext>(null);
1313

1414
const mutateContext = useCallback(async (updatedContext: EvaluationContext) => {
1515
if (previousContext.current !== updatedContext) {

0 commit comments

Comments
 (0)