### Website or app

https://github.com/coolwind0202/web/blob/23877f77e23837a007aada5be363d65290571c88/web/src/components/page/members/IndexPage/IndexPage.tsx#L27

### Repro steps

For checking whenever my project will work correctly, when I run a command `next dev`, errors which are shown below occurred.

![image](https://user-images.githubusercontent.com/51913600/168043187-bf77a943-39c4-45d3-9a1d-2cdf97c904df.png)

When I pass a first argument which is an **object** to `console.log()`, `console.error()`, `console.warn()`, I can repro the errors.
for example, 
```
console.log([]);
console.error({});
```

Before a few days, the errors had never occured.
When I disable DevTools, the errors calm down.

I think, the errors may be caused by the codes which are shown below.
https://github.com/facebook/react/blob/7d9e17a9826595dacbf9e19e8f85b07837adf276/packages/react-devtools-shared/src/backend/utils.js#L193

### How often does this bug happen?

Every time

### DevTools package (automated)

_No response_

### DevTools version (automated)

_No response_

### Error message (automated)

_No response_

### Error call stack (automated)

_No response_

### Error component stack (automated)

_No response_

### GitHub query string (automated)

_No response_
/**
 * Install the hook on window, which is an event emitter.
 * Note because Chrome content scripts cannot directly modify the window object,
 * we are evaling this function by inserting a script tag.
 * That's why we have to inline the whole event emitter implementation,
 * the string format implementation, and part of the console implementation here.
 *
 * @flow
 */
import type {BrowserTheme} from 'react-devtools-shared/src/devtools/views/DevTools';
import type {DevToolsHook} from 'react-devtools-shared/src/backend/types';
import {
  patch as patchConsole,
  registerRenderer as registerRendererWithConsole,
} from './backend/console';
declare var window: any;
export function installHook(target: any): DevToolsHook | null {
  if (target.hasOwnProperty('__REACT_DEVTOOLS_GLOBAL_HOOK__')) {
    return null;
  }
  let targetConsole: Object = console;
  let targetConsoleMethods = {};
  for (const method in console) {
    targetConsoleMethods[method] = console[method];
  }
  function dangerous_setTargetConsoleForTesting(