Call toString on args to match browser behavior.

This commit is contained in:
Zach Bjornson 2013-07-20 09:22:32 -07:00
parent c1673f281c
commit c391d903e3
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@
"use strict";
function btoa(str) {
return new Buffer(str, 'binary').toString('base64');
return new Buffer(str.toString(), 'binary').toString('base64');
}
module.exports = btoa;