Skip to content

Commit

Permalink
fix: ensure app id cache is safe
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Dec 16, 2024
1 parent 4a6eb2a commit 9b10728
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {type ReactNode, useMemo} from 'react'
import {type ReactNode, useMemo, useState} from 'react'
import {SanityCreateConfigContext} from 'sanity/_singletons'

import {useSource} from '../../studio'
Expand All @@ -19,7 +19,7 @@ export function SanityCreateConfigProvider(props: SanityCreateConfigProviderProp
const {children} = props
const {beta} = useSource()

const appIdCache = useMemo(() => createAppIdCache(), [])
const [appIdCache] = useState(() => createAppIdCache())

const value = useMemo((): SanityCreateConfigContextValue => {
return {
Expand Down

0 comments on commit 9b10728

Please sign in to comment.