Skip to content

Commit 867aa01

Browse files
committed
fix sokra#8: "charset=utf-8" can also apply to base64 data
1 parent 3cf8dfe commit 867aa01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
// Check for a non-empty data URL payload
9696
if (match && match[2]) {
9797
const parts = match[1].split(';');
98-
const map = parts.indexOf('charset=utf-8') >= 0 ? decodeURIComponent(match[2]) : atob(match[2]);
98+
const map = parts.indexOf('base64') >= 0 ? atob(match[2]) : decodeURIComponent(match[2]);
9999
finishLoading(code, map);
100100
}
101101

0 commit comments

Comments
 (0)