summaryrefslogtreecommitdiff
path: root/frontend/src/toaster.tsx
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-05-25 19:14:54 -0400
committerAAGaming <aagaming@riseup.net>2024-05-25 19:14:54 -0400
commita84a13c76d99f1e6f4505d43108a4111749e5035 (patch)
treee2826700cd371e6590818047551028d8179389bf /frontend/src/toaster.tsx
parent96cc72f2ca25ccb312b68a29aca755bb7df660ed (diff)
downloaddecky-loader-a84a13c76d99f1e6f4505d43108a4111749e5035.tar.gz
decky-loader-a84a13c76d99f1e6f4505d43108a4111749e5035.zip
Custom error handler and some misc fixes
Diffstat (limited to 'frontend/src/toaster.tsx')
-rw-r--r--frontend/src/toaster.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/toaster.tsx b/frontend/src/toaster.tsx
index c6b15347..7f08cb01 100644
--- a/frontend/src/toaster.tsx
+++ b/frontend/src/toaster.tsx
@@ -1,7 +1,7 @@
+import type { ToastData } from '@decky/api';
import {
Export,
Patch,
- ToastData,
afterPatch,
findClass,
findInReactTree,
@@ -124,12 +124,12 @@ class Toaster extends Logger {
this.node.alternate.type = this.node.type;
}
};
- const oRender = this.rNode.stateNode.__proto__.render;
- let int: NodeJS.Timer | undefined;
+ const oRender = Object.getPrototypeOf(this.rNode.stateNode).render;
+ let int: NodeJS.Timeout | undefined;
this.rNode.stateNode.render = (...args: any[]) => {
const ret = oRender.call(this.rNode.stateNode, ...args);
if (ret && !this?.node?.return?.return) {
- clearInterval(int);
+ int && clearInterval(int);
int = setInterval(() => {
const n = findToasterRoot(tree, 0);
if (n?.return) {