Skip to content

Commit

Permalink
remove deprecated new Buffer(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 3, 2019
1 parent c6bd48e commit 3dc56d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SourceMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let btoa = () => {
if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
btoa = window.btoa;
} else if (typeof Buffer === 'function') {
btoa = str => new Buffer(str).toString('base64');
btoa = str => Buffer.from(str, 'utf-8').toString('base64');
}

export default class SourceMap {
Expand Down

0 comments on commit 3dc56d8

Please sign in to comment.