bug fix #4
2
index.js
2
index.js
|
@ -7,7 +7,7 @@
|
||||||
if (str instanceof Buffer) {
|
if (str instanceof Buffer) {
|
||||||
buffer = str;
|
buffer = str;
|
||||||
} else {
|
} else {
|
||||||
buffer = Buffer.from(str.toString(), 'binary');
|
buffer = Buffer.from(String(str), 'binary');
|
||||||
}
|
}
|
||||||
|
|
||||||
return buffer.toString('base64');
|
return buffer.toString('base64');
|
||||||
|
|
Loading…
Reference in New Issue