From eafa0b0a0dc4f4bdf55b5f1ac96a21ded4002d16 Mon Sep 17 00:00:00 2001 From: Spencer17x <1253478653@qq.com> Date: Tue, 17 Aug 2021 23:47:39 +0800 Subject: [PATCH] fix: Do not use default parameter values for ie https://github.com/brix/crypto-js/pull/357 --- src/enc-base64url.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/enc-base64url.js b/src/enc-base64url.js index 661ea39..f3366b0 100644 --- a/src/enc-base64url.js +++ b/src/enc-base64url.js @@ -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(); @@ -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) {