fix occasional breakage in makeImageDataUrl
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ export function theCard(fn, imageUrl, imageMimeType) {
|
||||
card = card || {};
|
||||
let mimeType = imageMimeType;
|
||||
// Is this a data URL "data:[<mediatype>][;base64],<data>"?
|
||||
const matches = /^data:(image\/[-a-z0-9+.]+)(;base64)?,/i.exec(imageUrl);
|
||||
const matches = /^data:(image\/[-a-z0-9+.]+)?(;base64)?,/i.exec(imageUrl);
|
||||
if (matches) {
|
||||
mimeType = matches[1];
|
||||
card.photo = {
|
||||
|
||||
Reference in New Issue
Block a user