From f6ffb60d0e5aa06f45eb79021b5666511569c7df Mon Sep 17 00:00:00 2001 From: Arya Rizky Date: Tue, 12 May 2026 07:32:53 +0700 Subject: [PATCH] fix(query-broadcast-client-experimental): suppress unhandled postMessage DataCloneError rejections Add .catch() handlers to all three BroadcastChannel postMessage calls to prevent unhandledrejection events when query state contains non-cloneable values (ReadableStream, Response, File, functions, etc.). Fixes #10543 --- packages/query-broadcast-client-experimental/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/query-broadcast-client-experimental/src/index.ts b/packages/query-broadcast-client-experimental/src/index.ts index e102b3c0b01..d259468456a 100644 --- a/packages/query-broadcast-client-experimental/src/index.ts +++ b/packages/query-broadcast-client-experimental/src/index.ts @@ -42,7 +42,7 @@ export function broadcastQueryClient({ queryHash, queryKey, state, - }) + }).catch(() => {}) } if (queryEvent.type === 'removed' && observers.length > 0) { @@ -50,7 +50,7 @@ export function broadcastQueryClient({ type: 'removed', queryHash, queryKey, - }) + }).catch(() => {}) } if (queryEvent.type === 'added') { @@ -58,7 +58,7 @@ export function broadcastQueryClient({ type: 'added', queryHash, queryKey, - }) + }).catch(() => {}) } })