1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

handle data blob error

This commit is contained in:
2025-11-16 01:23:01 +01:00
parent bade64953f
commit 724a7f6c19

View File

@@ -74,8 +74,13 @@ function formatTimestamp(ts) {
const dataRgx = /data:(.*?)(;|$)/;
function dataBlob(dataUrl) {
const [header, data] = dataUrl.split(","),
mime = header.match(dataRgx)[1];
const [header, data] = dataUrl.split(",");
if (!header || !data) {
return null;
}
const mime = header.match(dataRgx)[1];
let blob;