summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2025-01-03 22:53:37 -0500
committerAAGaming <aagaming@riseup.net>2025-01-03 22:53:37 -0500
commit054517595d7e50f3354d3eeeea8da1567e0b0dfc (patch)
tree30c5c11f4c6c19c75371aac9d01e20d68283bcda
parentceb10fd7cf8d419543a04e2caa52ec704baedb9b (diff)
downloaddecky-loader-054517595d7e50f3354d3eeeea8da1567e0b0dfc.tar.gz
decky-loader-054517595d7e50f3354d3eeeea8da1567e0b0dfc.zip
fix(ErrorBoundary): use same conditions as Valve boundary for renderingv3.1.2-pre1
this fixes the screenshot deletion error
-rw-r--r--frontend/src/errorboundary-hook.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/frontend/src/errorboundary-hook.tsx b/frontend/src/errorboundary-hook.tsx
index 95be77ab..2c69a267 100644
--- a/frontend/src/errorboundary-hook.tsx
+++ b/frontend/src/errorboundary-hook.tsx
@@ -79,9 +79,17 @@ class ErrorBoundaryHook extends Logger {
this.setState(stateClone);
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;
- return (
+
+ return void 0 !== this.props.fallback ? (
+ 'function' == typeof this.props.fallback ? (
+ this.props.fallback(this.state.error.error)
+ ) : (
+ this.props.fallback
+ )
+ ) : (
<DeckyErrorBoundary
error={this.state.error}
errorKey={this.props.errorKey}