From 59ea2645db827335a0689d2fb7aeeef4e52af52b Mon Sep 17 00:00:00 2001 From: mhsanaei Date: Thu, 18 Sep 2025 13:56:04 +0200 Subject: new: subJsonEnable after this subEnable by default is true and subJsonEnable is false --- web/assets/js/subscription.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/assets/js/subscription.js') 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); -- cgit v1.2.3