Unverified Commit 3f19ee59 authored by Kevin Mårtensson's avatar Kevin Mårtensson Committed by GitHub

fix: only call `captureOwnerStack` if it exists (#86982)

parent 27c24bf7
...@@ -160,8 +160,8 @@ function applyOwnerStack(error: Error) { ...@@ -160,8 +160,8 @@ function applyOwnerStack(error: Error) {
// via `throwIfDisallowedDynamic`. // via `throwIfDisallowedDynamic`.
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
const ownerStack = const ownerStack =
getClientReact()?.captureOwnerStack() ?? getClientReact()?.captureOwnerStack?.() ??
getServerReact()?.captureOwnerStack() getServerReact()?.captureOwnerStack?.()
if (ownerStack) { if (ownerStack) {
let stack = ownerStack let stack = ownerStack
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment