From 550b2ba03592d13f361550d7604dcdda265b30b9 Mon Sep 17 00:00:00 2001 From: Ruslan Lesiutin Date: Fri, 4 Jul 2025 09:28:32 +0100 Subject: [PATCH] [devtools] fix: support optionality of structured stack trace function name --- packages/react-devtools-shared/src/backend/utils/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-devtools-shared/src/backend/utils/index.js b/packages/react-devtools-shared/src/backend/utils/index.js index a8a2053204f22..17250a1906836 100644 --- a/packages/react-devtools-shared/src/backend/utils/index.js +++ b/packages/react-devtools-shared/src/backend/utils/index.js @@ -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.