You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have SuspenseList for the tree view but not when printing JSX.
When we fallthrough here we call getDisplayName with a symbol, because we assume that if it's not a string, then it's a function. We should be checking whether it is a function before calling getDisplayName.
Subsequently if we call getDisplayName with a symbol we get the error invalid value used as weak map key which messes up things after that. I think that's the actual cause of #19364
The text was updated successfully, but these errors were encountered:
@sebmarkbage I'm happy to take this on if you like! Just to clarify, what would be the expected behavior of calling getDisplayNameForReactElement on a symbol? Returning 'Symbol'?
Also should we handle the case where it falls through and is neither a symbol nor a function? In this case should it simply return 'Anonymous'?
Sorry for any confusion earlier! I just took a stab at adding SuspenseList and adding a check to only pass functions into getDisplayName. (I've submitted my CLA)
react/packages/react-devtools-shared/src/utils.js
Line 491 in 49af889
We have SuspenseList for the tree view but not when printing JSX.
When we fallthrough here we call getDisplayName with a symbol, because we assume that if it's not a string, then it's a function. We should be checking whether it is a function before calling getDisplayName.
Subsequently if we call getDisplayName with a symbol we get the error
invalid value used as weak map key
which messes up things after that. I think that's the actual cause of #19364The text was updated successfully, but these errors were encountered: