From 559f47c97fc332fcf2a7237c03da622f6ed414f6 Mon Sep 17 00:00:00 2001 From: Florian Dagner Date: Mon, 9 Oct 2023 11:59:06 +0200 Subject: [PATCH] Check if undefined --- templates/qr.mustache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/qr.mustache b/templates/qr.mustache index 6e3ab0f..12432d3 100644 --- a/templates/qr.mustache +++ b/templates/qr.mustache @@ -102,6 +102,7 @@ {{#qrcodecontent}} {{#js}} + if (typeof QRCode !== 'undefined') { let config{{id}} = { content: "{{{qrcodecontent}}}", color: "#000000", @@ -114,5 +115,6 @@ let qrcode{{id}} = new QRCode(config{{id}}); let svg{{id}} = qrcode{{id}}.svg(); document.getElementById("container{{id}}").innerHTML = svg{{id}}; + } {{/js}} {{/qrcodecontent}}