We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1965632 commit 2c14807Copy full SHA for 2c14807
1 file changed
src/app/core/imageshape.js
@@ -463,10 +463,11 @@ thin.core.ImageShape.prototype.asJSON = function() {
463
464
// data:image/png;base64,xxxxxxxx
465
var content = this.getFile().getContent();
466
- if (/^data:(.+?);base64,(.+)/.test(content)) {
+ var dataUri = content.match(/^data:(.+?);base64,(.+)/);
467
+ if (dataUri) {
468
goog.object.set(object, 'data', {
- 'mime-type': RegExp.$1,
469
- 'base64': RegExp.$2
+ 'mime-type': dataUri[1],
470
+ 'base64': dataUri[2]
471
});
472
}
473
0 commit comments