summaryrefslogtreecommitdiff
path: root/frontend/src/plugin-loader.tsx
diff options
context:
space:
mode:
authorYao Chung Hu <30311066+FlashyReese@users.noreply.github.com>2026-10-26 16:08:24 -0600
committerGitHub <noreply@github.com>2026-10-26 18:08:24 -0400
commit6301508037b30489c42ee9ea8acee97cdea76297 (patch)
tree8a26cb6f89b18ff7ccef4f90ab91f48354f32049 /frontend/src/plugin-loader.tsx
parent8395766dcda9eca166da5e8b9e600d432d8f5607 (diff)
downloaddecky-loader-6301508037b30489c42ee9ea8acee97cdea76297.tar.gz
decky-loader-6301508037b30489c42ee9ea8acee97cdea76297.zip
fix: handle plugin store load failures (#1001)HEADmainaa/v4-work
Diffstat (limited to 'frontend/src/plugin-loader.tsx')
-rw-r--r--frontend/src/plugin-loader.tsx23
1 files changed, 14 insertions, 9 deletions
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index 185d260a..81b96dcc 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -34,7 +34,7 @@ import { NotificationService } from './notification-service';
import { DisabledPlugin, InstallType, Plugin, PluginLoadType } from './plugin';
import RouterHook from './router-hook';
import { deinitSteamFixes, initSteamFixes } from './steamfixes';
-import { checkForPluginUpdates } from './store';
+import { PluginUpdateMapping, checkForPluginUpdates } from './store';
import TabsHook from './tabs-hook';
import Toaster from './toaster';
import { getVersionInfo } from './updater';
@@ -274,19 +274,24 @@ class PluginLoader extends Logger {
await this.notifyPluginUpdates();
}
- public async checkPluginUpdates() {
- const frozenPlugins = this.deckyState.publicState().frozenPlugins;
+ public async checkPluginUpdates(): Promise<PluginUpdateMapping | null> {
+ try {
+ const frozenPlugins = this.deckyState.publicState().frozenPlugins;
- const updates = await checkForPluginUpdates(
- this.deckyState.publicState().installedPlugins.filter((p) => !frozenPlugins.includes(p.name)),
- );
- this.deckyState.setUpdates(updates);
- return updates;
+ const updates = await checkForPluginUpdates(
+ this.deckyState.publicState().installedPlugins.filter((p) => !frozenPlugins.includes(p.name)),
+ );
+ this.deckyState.setUpdates(updates);
+ return updates;
+ } catch (error) {
+ this.error('Failed to check for plugin updates', error);
+ return null;
+ }
}
public async notifyPluginUpdates() {
const updates = await this.checkPluginUpdates();
- if (updates?.size > 0 && this.notificationService.shouldNotify('pluginUpdates')) {
+ if (updates && updates.size > 0 && this.notificationService.shouldNotify('pluginUpdates')) {
this.pluginUpdateToast && this.pluginUpdateToast.dismiss();
this.pluginUpdateToast = this.toaster.toast({
title: <TranslationHelper transClass={TranslationClass.PLUGIN_LOADER} transText="decky_title" />,