Skip to content

Commit

Permalink
fix: Do not use default parameter values for ie brix#357
Browse files Browse the repository at this point in the history
  • Loading branch information
spencer17x committed Aug 17, 2021
1 parent ecfe2e4 commit eafa0b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/enc-base64url.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
*
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
*/
stringify: function (wordArray, urlSafe=true) {
stringify: function (wordArray, urlSafe) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var map = urlSafe ? this._safe_map : this._map;
var map = urlSafe === undefined ? this._map : this._safe_map;

// Clamp excess bits
wordArray.clamp();
Expand Down Expand Up @@ -73,10 +73,10 @@
*
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
*/
parse: function (base64Str, urlSafe=true) {
parse: function (base64Str, urlSafe) {
// Shortcuts
var base64StrLength = base64Str.length;
var map = urlSafe ? this._safe_map : this._map;
var map = urlSafe === undefined ? this._map : this._safe_map;
var reverseMap = this._reverseMap;

if (!reverseMap) {
Expand Down

0 comments on commit eafa0b0

Please sign in to comment.