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:
@@ -74,8 +74,13 @@ function formatTimestamp(ts) {
|
|||||||
const dataRgx = /data:(.*?)(;|$)/;
|
const dataRgx = /data:(.*?)(;|$)/;
|
||||||
|
|
||||||
function dataBlob(dataUrl) {
|
function dataBlob(dataUrl) {
|
||||||
const [header, data] = dataUrl.split(","),
|
const [header, data] = dataUrl.split(",");
|
||||||
mime = header.match(dataRgx)[1];
|
|
||||||
|
if (!header || !data) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mime = header.match(dataRgx)[1];
|
||||||
|
|
||||||
let blob;
|
let blob;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user