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:(.*?)(;|$)/;
|
||||
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user