Skip to content

Commit 4dc8256

Browse files
authored
fix(angular-query): fix console warning on Angular 19 (#8422)
1 parent e7d7d36 commit 4dc8256

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular-query-experimental/src/create-base-query.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
DestroyRef,
33
Injector,
44
NgZone,
5+
VERSION,
56
computed,
67
effect,
78
inject,
@@ -97,7 +98,8 @@ export function createBaseQuery<
9798
},
9899
{
99100
// Set allowSignalWrites to support Angular < v19
100-
allowSignalWrites: true,
101+
// Set to undefined to avoid warning on newer versions
102+
allowSignalWrites: VERSION.major < '19' || undefined,
101103
injector,
102104
},
103105
)

0 commit comments

Comments
 (0)