summaryrefslogtreecommitdiff
path: root/frontend/src
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-07-17 19:38:06 -0400
committerAAGaming <aagaming@riseup.net>2024-07-17 19:38:06 -0400
commit24c3d3c8f1a51ee88d2c169ba3de619df453e171 (patch)
tree3e1daa4c48e532b54d96edb1f92dbc1c40bcd886 /frontend/src
parent2000eaf3995ffed98e21c77b45f221c83bac834b (diff)
downloaddecky-loader-24c3d3c8f1a51ee88d2c169ba3de619df453e171.tar.gz
decky-loader-24c3d3c8f1a51ee88d2c169ba3de619df453e171.zip
remove duplicate find in ErrorBoundary
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/errorboundary-hook.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/frontend/src/errorboundary-hook.tsx b/frontend/src/errorboundary-hook.tsx
index 9a603460..8c96d9f4 100644
--- a/frontend/src/errorboundary-hook.tsx
+++ b/frontend/src/errorboundary-hook.tsx
@@ -1,4 +1,4 @@
-import { Patch, callOriginal, findModuleExport, replacePatch } from '@decky/ui';
+import { ErrorBoundary, Patch, callOriginal, findModuleExport, replacePatch } from '@decky/ui';
import DeckyErrorBoundary from './components/DeckyErrorBoundary';
import Logger from './logger';
@@ -70,15 +70,12 @@ class ErrorBoundaryHook extends Logger {
return shouldReport ? callOriginal : true;
});
- const ValveErrorBoundary = findModuleExport(
- (e) => e.InstallErrorReportingStore && e?.prototype?.Reset && e?.prototype?.componentDidCatch,
- );
- if (!ValveErrorBoundary) {
+ if (!ErrorBoundary) {
this.error('could not find ValveErrorBoundary');
return;
}
- this.errorBoundaryPatch = replacePatch(ValveErrorBoundary.prototype, 'render', function (this: any) {
+ this.errorBoundaryPatch = replacePatch(ErrorBoundary.prototype, 'render', function (this: any) {
if (this.state.error) {
const store = Object.getPrototypeOf(this)?.constructor?.sm_ErrorReportingStore || errorReportingStore;
return (