mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 02:45:29 -04:00
Merge pull request #330 from getmango/fix/subscription-manager-single-plugin
Correctly load subscriptions when there's only one plugin
This commit is contained in:
commit
2597b4ce60
@ -13,12 +13,12 @@ const component = () => {
|
||||
if (!data.success) throw new Error(data.error);
|
||||
this.plugins = data.plugins;
|
||||
|
||||
const pid = localStorage.getItem("plugin");
|
||||
if (pid && this.plugins.map((p) => p.id).includes(pid))
|
||||
this.pid = pid;
|
||||
else if (this.plugins.length > 0)
|
||||
this.pid = this.plugins[0].id;
|
||||
let pid = localStorage.getItem("plugin");
|
||||
if (!pid || !this.plugins.find((p) => p.id === pid)) {
|
||||
pid = this.plugins[0].id;
|
||||
}
|
||||
|
||||
this.pid = pid;
|
||||
this.list(pid);
|
||||
})
|
||||
.catch((e) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user