diff --git a/src/vanilla/store.ts b/src/vanilla/store.ts index 70d39a90df..395ff345c2 100644 --- a/src/vanilla/store.ts +++ b/src/vanilla/store.ts @@ -711,7 +711,7 @@ const buildStore = ( return store } -const deriveDevStore = (store: Store): Store & DevStoreRev4 => { +const deriveDevStoreRev4 = (store: Store): Store & DevStoreRev4 => { const proxyAtomStateMap = new WeakMap() const debugMountedAtoms = new Set() let savedGetAtomState: StoreArgs[0] @@ -811,7 +811,7 @@ export const createStore = (): PrdOrDevStore => { (atom, ...params) => atom.onMount?.(...params), ) if (import.meta.env?.MODE !== 'production') { - return deriveDevStore(store) + return deriveDevStoreRev4(store) } return store }