From fde43c41d037e4fa46c90c05cd9b1b3ac31b6040 Mon Sep 17 00:00:00 2001 From: Grayash Date: Tue, 11 Aug 2026 16:18:46 +0900 Subject: [PATCH] fix(react-router): honor preventScriptHoist during hydration --- packages/react-router/src/Asset.tsx | 12 ++- packages/react-router/tests/Scripts.test.tsx | 77 ++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/packages/react-router/src/Asset.tsx b/packages/react-router/src/Asset.tsx index 5e4f159f526..7f6297732ba 100644 --- a/packages/react-router/src/Asset.tsx +++ b/packages/react-router/src/Asset.tsx @@ -270,7 +270,17 @@ function Script({ // After hydration, return null — the useEffect handles imperative injection. if (!hydrated) { if (attrs?.src) { - return