From a937f801fa5118d579b1708eb83c69ee11bf48d8 Mon Sep 17 00:00:00 2001 From: Vytenis Date: Wed, 15 Sep 2021 00:36:28 +0300 Subject: [PATCH] Update index.js check window object only if it is options.hash is not set. --- src/web-auth/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/web-auth/index.js b/src/web-auth/index.js index a081156d..d98672d3 100644 --- a/src/web-auth/index.js +++ b/src/web-auth/index.js @@ -214,10 +214,8 @@ WebAuth.prototype.parseHash = function(options, cb) { options = options || {}; } - var _window = windowHelper.getWindow(); - var hashStr = - options.hash === undefined ? _window.location.hash : options.hash; + options.hash === undefined ? windowHelper.getWindow().location.hash : options.hash; hashStr = hashStr.replace(/^#?\/?/, ''); parsedQs = qs.parse(hashStr);