Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'web/assets/js/subscription.js')
-rw-r--r--web/assets/js/subscription.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/assets/js/subscription.js b/web/assets/js/subscription.js
index 2c731be3..0af95890 100644
--- a/web/assets/js/subscription.js
+++ b/web/assets/js/subscription.js
@@ -101,7 +101,10 @@
if (sj) this.app.subJsonUrl = sj;
drawQR(this.app.subUrl);
try {
- new QRious({ element: document.getElementById('qrcode-subjson'), value: this.app.subJsonUrl || '', size: 220 });
+ const elJson = document.getElementById('qrcode-subjson');
+ if (elJson && this.app.subJsonUrl) {
+ new QRious({ element: elJson, value: this.app.subJsonUrl, size: 220 });
+ }
} catch (e) { /* ignore */ }
this._onResize = () => { this.viewportWidth = window.innerWidth; };
window.addEventListener('resize', this._onResize);