Skip to content

Commit 32b3836

Browse files
mattbaileyukandrew-coleman
authored andcommitted
Replace deprecated Buffer call (#361)
* Update functions.js * Update functions.js
1 parent 0d0fa7b commit 32b3836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ const functions = (() => {
553553
// Simply doing `new Buffer` at this point causes Browserify to pull
554554
// in the entire Buffer browser library, which is large and unnecessary.
555555
// Using `global.Buffer` defeats this.
556-
return new global.Buffer(str, 'binary').toString('base64');
556+
return new global.Buffer.from(str, 'binary').toString('base64'); // eslint-disable-line new-cap
557557
};
558558
return btoa(str);
559559
}

0 commit comments

Comments
 (0)