File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/next/src/client/components Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -217,9 +217,9 @@ class InnerScrollAndFocusHandler extends React.Component<ScrollAndFocusHandlerPr
217217 while ( ! ( domNode instanceof HTMLElement ) || shouldSkipElement ( domNode ) ) {
218218 if ( process . env . NODE_ENV !== 'production' ) {
219219 if ( domNode . parentElement ?. localName === 'head' ) {
220- console . error (
221- 'Tried to scroll to a head element. This is a bug in Next.js.'
222- )
220+ // TODO: We enter this state when metadata was rendered as part of the page or via Next.js.
221+ // This is always a bug in Next.js and caused by React hoisting metadata.
222+ // We need to replace `findDOMNode` in favor of Fragment Refs (when available) so that we can skip over metadata.
223223 }
224224 }
225225
You can’t perform that action at this time.
0 commit comments