mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-17 08:47:49 +00:00
fix logical error when no store was set
This commit is contained in:
+22
-1
@@ -44,7 +44,28 @@ export async function getPluginList(): Promise<StorePlugin[]> {
|
|||||||
if (store === null) {
|
if (store === null) {
|
||||||
console.log('Could not get store, using Default.');
|
console.log('Could not get store, using Default.');
|
||||||
await setSetting('store', Store.Default);
|
await setSetting('store', Store.Default);
|
||||||
store = Store.Default;
|
store = Store.Default
|
||||||
|
}
|
||||||
|
switch (+store) {
|
||||||
|
case Store.Default:
|
||||||
|
storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
||||||
|
break;
|
||||||
|
case Store.Testing:
|
||||||
|
storeURL = 'https://testing.deckbrew.xyz/plugins';
|
||||||
|
break;
|
||||||
|
case Store.Custom:
|
||||||
|
storeURL = customURL;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.error('Somehow you ended up without a standard URL, using the default URL.');
|
||||||
|
storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
||||||
|
break;
|
||||||
|
return fetch(storeURL, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'X-Decky-Version': version.current,
|
||||||
|
},
|
||||||
|
}).then((r) => r.json());
|
||||||
}
|
}
|
||||||
switch (+store) {
|
switch (+store) {
|
||||||
case Store.Default:
|
case Store.Default:
|
||||||
|
|||||||
Reference in New Issue
Block a user