diff --git a/src/SourceMap.js b/src/SourceMap.js index 27c1623..e5ce40b 100644 --- a/src/SourceMap.js +++ b/src/SourceMap.js @@ -4,7 +4,7 @@ let btoa = () => { throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.'); }; if (typeof window !== 'undefined' && typeof window.btoa === 'function') { - btoa = window.btoa; + btoa = str => window.btoa(unescape(encodeURIComponent(str))); } else if (typeof Buffer === 'function') { btoa = str => Buffer.from(str, 'utf-8').toString('base64'); }