summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2024-06-29 17:41:03 -0400
committerAAGaming <aagaming@riseup.net>2024-06-29 17:41:03 -0400
commit725ebd5835bfdb4c41fb0e2be195feb781fb7141 (patch)
treeb402c97df0cbaf0472b331f235641093b0cd3903 /frontend
parent58cd6e9541f3b6310f21122dcc8d8c8b4bc8550c (diff)
downloaddecky-loader-725ebd5835bfdb4c41fb0e2be195feb781fb7141.tar.gz
decky-loader-725ebd5835bfdb4c41fb0e2be195feb781fb7141.zip
fix: add .bind to legacy plugin API to fix filepicker
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/plugin-loader.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index e84343c4..59d6b5bd 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -625,9 +625,9 @@ class PluginLoader extends Logger {
routerHook: this.routerHook,
toaster: this.toaster,
// Legacy
- callServerMethod: this.callServerMethod,
- openFilePicker: this.openFilePickerLegacy,
- openFilePickerV2: this.openFilePicker,
+ callServerMethod: this.callServerMethod.bind(this),
+ openFilePicker: this.openFilePickerLegacy.bind(this),
+ openFilePickerV2: this.openFilePicker.bind(this),
// Legacy
async callPluginMethod(methodName: string, args = {}) {
return DeckyBackend.call<[pluginName: string, methodName: string, kwargs: any], any>(
@@ -637,7 +637,7 @@ class PluginLoader extends Logger {
args,
);
},
- fetchNoCors: this.legacyFetchNoCors,
+ fetchNoCors: this.legacyFetchNoCors.bind(this),
executeInTab: DeckyBackend.callable<
[tab: String, runAsync: Boolean, code: string],
{ success: boolean; result: any }