Skip to content

Commit 2c14807

Browse files
author
maeda-m
committed
Changed matcher method in DataURISchema
1 parent 1965632 commit 2c14807

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/app/core/imageshape.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,11 @@ thin.core.ImageShape.prototype.asJSON = function() {
463463

464464
// data:image/png;base64,xxxxxxxx
465465
var content = this.getFile().getContent();
466-
if (/^data:(.+?);base64,(.+)/.test(content)) {
466+
var dataUri = content.match(/^data:(.+?);base64,(.+)/);
467+
if (dataUri) {
467468
goog.object.set(object, 'data', {
468-
'mime-type': RegExp.$1,
469-
'base64': RegExp.$2
469+
'mime-type': dataUri[1],
470+
'base64': dataUri[2]
470471
});
471472
}
472473

0 commit comments

Comments
 (0)