Skip to content

Commit

Permalink
fix(react-router): Fix hydration SyntaxError in ScriptOnce by changin…
Browse files Browse the repository at this point in the history
…g template literal to string concatenation in console.info (#2726)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
adrifer and autofix-ci[bot] authored Nov 10, 2024
1 parent 7865c3f commit 671a637
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/react-router/src/ScriptOnce.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ export function ScriptOnce({
__html: [
children,
(log ?? true) && process.env.NODE_ENV === 'development'
? `console.info(\`Injected From Server:
${children}\`)`
? "console.info('Injected From Server:\\n" + children + "');"
: '',
]
.filter(Boolean)
Expand Down

0 comments on commit 671a637

Please sign in to comment.