Skip to content

Commit a3dc9eb

Browse files
author
Antelle
committed
better regex check
1 parent c0c13cc commit a3dc9eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FileSaver.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var saveAs = saveAs || (function(view) {
9999
var reader = new FileReader();
100100
reader.onloadend = function() {
101101
var base64Data = reader.result;
102-
base64Data = base64Data.replace(/^data:.*;/, 'data:attachment/file;');
102+
base64Data = base64Data.replace(/^data:.*?;/, 'data:attachment/file;');
103103
target_view.location.href = encodeURI(base64Data);
104104
filesaver.readyState = filesaver.DONE;
105105
dispatch_all();

0 commit comments

Comments
 (0)