Skip to content

Commit 235bbab

Browse files
committed
refactor(angular-query) set initial isRestoring to true to match the React adapter logic
1 parent ffa43a8 commit 235bbab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/angular-persist-query-client-experimental/src/with-persist-query-client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type PersistQueryClientOptions = {
5656
export function withPersistQueryClient(
5757
persistQueryClientOptions: Array<PersistQueryClientOptions>,
5858
): PersistQueryClientFeature {
59-
const isRestoring = signal(false)
59+
const isRestoring = signal(true)
6060
const providers = [
6161
provideIsRestoring(isRestoring.asReadonly()),
6262
{
@@ -67,7 +67,6 @@ export function withPersistQueryClient(
6767
const destroyRef = inject(DestroyRef)
6868
const queryClient = injectQueryClient()
6969

70-
isRestoring.set(true)
7170
const restorations = persistQueryClientOptions.map(
7271
({ onSuccess, persistOptions }) => {
7372
const options = { queryClient, ...persistOptions }

0 commit comments

Comments
 (0)