From fd650bdf45272f66ebf35438abbeb01699a8e53b Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Sun, 20 Feb 2022 03:58:36 +0000 Subject: [PATCH] Fix null pid --- public/js/subscription-manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/js/subscription-manager.js b/public/js/subscription-manager.js index 7206c56..8e49c05 100644 --- a/public/js/subscription-manager.js +++ b/public/js/subscription-manager.js @@ -19,7 +19,7 @@ const component = () => { else if (this.plugins.length > 0) this.pid = this.plugins[0].id; - if (this.pid) this.list(pid); + this.list(pid); }) .catch((e) => { alert( @@ -33,6 +33,7 @@ const component = () => { this.list(this.pid); }, list(pid) { + if (!pid) return; fetch( `${base_url}api/admin/plugin/subscriptions?${new URLSearchParams( {