Skip to content

Commit

Permalink
fix commit
Browse files Browse the repository at this point in the history
Signed-off-by: Will Chou <[email protected]>
  • Loading branch information
wichopy committed Oct 13, 2024
1 parent ba9081f commit 2bab15a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/provider/use-context-mutator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useContext } from 'react';
import { useCallback, useContext, useRef } from 'react';
import { OpenFeature, EvaluationContext } from '@openfeature/web-sdk';
import { Context } from './context';

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

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

0 comments on commit 2bab15a

Please sign in to comment.