diff --git a/README.md b/README.md index c7ae1ed..214b32a 100644 --- a/README.md +++ b/README.md @@ -64,4 +64,3 @@ the async API returns the error to the callback. ## License [MIT](https://github.com/aheckmann/node-ses/blob/master/LICENSE) - diff --git a/lib/secure-random-string.js b/lib/secure-random-string.js index abcf119..cc67b9c 100644 --- a/lib/secure-random-string.js +++ b/lib/secure-random-string.js @@ -27,10 +27,9 @@ function srs(options, cb) { function _finish(buf) { var string = buf.toString('base64'); if (alphanumeric === true) { - string = string.replace(/[\W_]+/g,''); - } - else { - string = string.replace(/\//g,'_').replace(/\+/g,'-'); + string = string.replace(/[\W_]+/g, ''); + } else { + string = string.replace(/\//g, '_').replace(/\+/g, '-'); } return string.substr(0, length); }