CrashHandler: log component stack on crash (#3933)

This commit is contained in:
sadan4 2026-01-27 22:56:05 -05:00 committed by GitHub
parent d86423cae3
commit 38a9f12296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,6 +76,13 @@ export default definePlugin({
],
handleCrash(_this: any, errorState: any) {
if (IS_DEV) {
try {
if (errorState?.info && "componentStack" in errorState.info) {
console.error("Component Stack:", errorState.info.componentStack);
}
} catch { }
}
_this.setState(errorState);
// Already recovering, prevent error which happens more than once too fast to trigger another recover