Skip to content

Commit

Permalink
Merge pull request #6 from mebis-lp/MBS-8250-block_qr-undefined
Browse files Browse the repository at this point in the history
Check if undefined
  • Loading branch information
tholudwig authored Nov 3, 2023
2 parents bde68e2 + 559f47c commit 4b7c682
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/qr.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
{{#qrcodecontent}}
<script src="{{javascript}}"></script>
{{#js}}
if (typeof QRCode !== 'undefined') {
let config{{id}} = {
content: "{{{qrcodecontent}}}",
color: "#000000",
Expand All @@ -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}}

0 comments on commit 4b7c682

Please sign in to comment.