mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[devtools] fix: support optionality of structured stack trace function name (#33697)
Follow-up to https://github.com/facebook/react/pull/33680. Turns out `.getFunctionName` not always returns string.
This commit is contained in:
parent
ef8b6fa257
commit
3fc1bc6f28
|
|
@ -360,8 +360,9 @@ function collectStackTrace(
|
|||
const callSite = structuredStackTrace[i];
|
||||
const name = callSite.getFunctionName();
|
||||
if (
|
||||
name.includes('react_stack_bottom_frame') ||
|
||||
name.includes('react-stack-bottom-frame')
|
||||
name != null &&
|
||||
(name.includes('react_stack_bottom_frame') ||
|
||||
name.includes('react-stack-bottom-frame'))
|
||||
) {
|
||||
// We pick the last frame that matches before the bottom frame since
|
||||
// that will be immediately inside the component as opposed to some helper.
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user