diff --git a/packages/react-router/src/Asset.tsx b/packages/react-router/src/Asset.tsx index 79ceb8ed77..ce1a9699e4 100644 --- a/packages/react-router/src/Asset.tsx +++ b/packages/react-router/src/Asset.tsx @@ -144,11 +144,13 @@ function Script({ }, [attrs, children]) if (!router.isServer) { + const { src, ...rest } = attrs || {} // render an empty script on the client just to avoid hydration errors return ( ) }