From 8977a68558631f36efe2ca5419ecdc29d7121657 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Wed, 21 Jul 2021 18:41:40 +0200 Subject: [PATCH] refactor: rename internal _hotUpdate --- src/store.ts | 4 ++-- src/types.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store.ts b/src/store.ts index 87dc9ea4..5e6e219b 100644 --- a/src/store.ts +++ b/src/store.ts @@ -432,7 +432,7 @@ function createSetupStore< // add the hotUpdate before plugins to allow them to override it if (__DEV__) { - store.hotUpdate = markRaw((newStore) => { + store._hotUpdate = markRaw((newStore) => { newStore._hmrPayload.state.forEach((stateKey) => { if (stateKey in store.$state) { // @ts-expect-error @@ -736,7 +736,7 @@ export function defineStore(idOrOptions: any, setup?: any, setupOptions?: any) { true ) - hot.hotUpdate(newStore as any) + hot._hotUpdate(newStore as any) // cleanup the state properties and the store from the cache delete pinia.state.value[hotId] diff --git a/src/types.ts b/src/types.ts index 418d65c8..63b5a876 100644 --- a/src/types.ts +++ b/src/types.ts @@ -261,7 +261,7 @@ export interface StoreWithState< * * @internal */ - hotUpdate(useStore: Store): void + _hotUpdate(useStore: Store): void /** * Payload of the hmr update. Dev only. -- 2.47.2