mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 04:05:04 +03:00
fix(ErrorBoundary): use same conditions as Valve boundary for rendering
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled
Builder Win / Build PluginLoader for Win (push) Has been cancelled
Builder / Build PluginLoader (push) Has been cancelled
Push Updated Plugin Stub to Template / copy-stub (push) Has been cancelled
Lint / Run linters (push) Has been cancelled
Type Check / Run type checkers (push) Has been cancelled
this fixes the screenshot deletion error
This commit is contained in:
@@ -79,9 +79,17 @@ class ErrorBoundaryHook extends Logger {
|
|||||||
this.setState(stateClone);
|
this.setState(stateClone);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (this.state.error) {
|
// yoinked from valve error boundary
|
||||||
|
if (this.state.error && this.props.errorKey == this.state.lastErrorKey) {
|
||||||
const store = Object.getPrototypeOf(this)?.constructor?.sm_ErrorReportingStore || errorReportingStore;
|
const store = Object.getPrototypeOf(this)?.constructor?.sm_ErrorReportingStore || errorReportingStore;
|
||||||
return (
|
|
||||||
|
return void 0 !== this.props.fallback ? (
|
||||||
|
'function' == typeof this.props.fallback ? (
|
||||||
|
this.props.fallback(this.state.error.error)
|
||||||
|
) : (
|
||||||
|
this.props.fallback
|
||||||
|
)
|
||||||
|
) : (
|
||||||
<DeckyErrorBoundary
|
<DeckyErrorBoundary
|
||||||
error={this.state.error}
|
error={this.state.error}
|
||||||
errorKey={this.props.errorKey}
|
errorKey={this.props.errorKey}
|
||||||
|
|||||||
Reference in New Issue
Block a user