Fix html renderer bug

This commit is contained in:
Nicholas Jitkoff 2022-05-07 13:41:58 -07:00
parent 57f8e855a1
commit be3c079a45
3 changed files with 3 additions and 3 deletions

View file

@ -265,7 +265,7 @@ function updateLink(url, title, push) {
function makeQRCode() {
var url =
"https://zxing.org/w/chart?cht=qr&chs=548x548&chld=L|1&choe=UTF-8&chl=" +
"https://chart.googleapis.com/chart?cht=qr&chs=512x512&chld=L|1&choe=UTF-8&chl=" +
encodeURIComponent(location.href);
this.href = url;
}

View file

@ -85,7 +85,7 @@
if (fragment.startsWith("data:")) {
let info = bitty.infoForDataURL(fragment);
const renderer = info.params?.render || renderers[info.mediatype].script;
const renderer = info.params?.render || renderers[info.mediatype]?.script;
if (info.mediatype == "text/html") {
dataPrefix = HEAD_TAGS;

View file

@ -255,7 +255,7 @@ function updateLink(url, title, push) {
function makeQRCode() {
var url =
"https://zxing.org/w/chart?cht=qr&chs=548x548&chld=L|1&choe=UTF-8&chl=" +
"https://chart.googleapis.com/chart?cht=qr&chs=512x512&chld=L|1&choe=UTF-8&chl=" +
encodeURIComponent(location.href);
this.href = url;
}