DevTools does not handle Symbol values logged to cosole.warn/console.error #21332
Labels
Component: Developer Tools
Status: Unconfirmed
A potential issue that we haven't yet confirmed as a bug
Type: Bug
React version: DevTools version 4.12.2-d14b6a4bdd
Steps To Reproduce
console.warn
from within a React component where the last argument is typeof"symbol"
Link to code example: https://codesandbox.io/s/pedantic-neumann-711ph?file=/src/App.js
The bug only happens when you make a change, so if you use the code sandbox link you need, open a new window, active dev tools, open the React dev tools and then uncomment line 5:
// return null
only then will the error actually happen.I've located the culprit to this line of code
react/packages/react-devtools-shared/src/backend/console.js
Lines 146 to 147 in 0e100ed
And would offer the following change
The current behavior
React DevTools is implicitly converting a Symbol to a string.
The expected behavior
React DevTools does not implicitly try to convert a Symbol to a string.
The text was updated successfully, but these errors were encountered: