From da7abc8f85709851751ed14eb1823364d27c2c2e Mon Sep 17 00:00:00 2001 From: Spencer17x <1253478653@qq.com> Date: Wed, 1 Sep 2021 15:11:00 +0800 Subject: [PATCH] fix: Do not use default parameter values for ie https://github.com/brix/crypto-js/pull/357 --- src/enc-base64url.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/enc-base64url.js b/src/enc-base64url.js index f3366b0..83da289 100644 --- a/src/enc-base64url.js +++ b/src/enc-base64url.js @@ -28,7 +28,7 @@ // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; - var map = urlSafe === undefined ? this._map : this._safe_map; + var map = urlSafe ? this._safe_map : this._map; // Clamp excess bits wordArray.clamp(); @@ -76,7 +76,7 @@ parse: function (base64Str, urlSafe) { // Shortcuts var base64StrLength = base64Str.length; - var map = urlSafe === undefined ? this._map : this._safe_map; + var map = urlSafe ? this._safe_map : this._map; var reverseMap = this._reverseMap; if (!reverseMap) {