From 4dc825661a244292e3ca6c810ffe909189de9f93 Mon Sep 17 00:00:00 2001 From: Arnoud <6420061+arnoud-dv@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:24:34 +0100 Subject: [PATCH] fix(angular-query): fix console warning on Angular 19 (#8422) --- packages/angular-query-experimental/src/create-base-query.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular-query-experimental/src/create-base-query.ts b/packages/angular-query-experimental/src/create-base-query.ts index 396236c901..d53a387087 100644 --- a/packages/angular-query-experimental/src/create-base-query.ts +++ b/packages/angular-query-experimental/src/create-base-query.ts @@ -2,6 +2,7 @@ import { DestroyRef, Injector, NgZone, + VERSION, computed, effect, inject, @@ -97,7 +98,8 @@ export function createBaseQuery< }, { // Set allowSignalWrites to support Angular < v19 - allowSignalWrites: true, + // Set to undefined to avoid warning on newer versions + allowSignalWrites: VERSION.major < '19' || undefined, injector, }, )