@leapdev/auth-agent 2.5.2 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leapdev/auth-agent",
3
- "version": "2.5.2",
3
+ "version": "2.5.4",
4
4
  "description": "LEAP Auth Agent",
5
5
  "license": "LEAP Legal Software, PTY LTD",
6
6
  "main": "./src/index.js",
package/src/index.umd.js CHANGED
@@ -6314,12 +6314,10 @@
6314
6314
  let inFlight;
6315
6315
  return factory => __awaiter(this, void 0, void 0, function* () {
6316
6316
  if (inFlight) return inFlight;
6317
- console.log('11111111111111');
6318
6317
  const promise = (() => __awaiter(this, void 0, void 0, function* () {
6319
6318
  try {
6320
6319
  return yield factory();
6321
6320
  } finally {
6322
- console.log('inFlight-------------------- cleanup');
6323
6321
  inFlight = undefined;
6324
6322
  }
6325
6323
  }))();
@@ -6742,12 +6740,12 @@
6742
6740
  let suffix;
6743
6741
  let redirections = redirectionConfig.environments;
6744
6742
  let environmentVariables;
6745
- suffix = topLevelDomainsV2.find(s => origin.endsWith(s));
6743
+ suffix = topLevelDomainsV2 && topLevelDomainsV2.length > 0 ? topLevelDomainsV2.find(s => origin.endsWith(s)) : undefined;
6746
6744
  if (suffix) {
6747
6745
  redirections = redirectionConfig.environments_v2;
6748
6746
  environmentVariables = {};
6749
6747
  } else {
6750
- suffix = topLevelDomains.find(s => origin.endsWith(s));
6748
+ suffix = topLevelDomains && topLevelDomains.length > 0 ? topLevelDomains.find(s => origin.endsWith(s)) : undefined;
6751
6749
  environmentVariables = redirectionConfig.environmentVariables;
6752
6750
  }
6753
6751
  if (suffix) {
@@ -7,13 +7,13 @@ export const getRedirectUri = (origin, decodedToken, redirectionConfig) => {
7
7
  let suffix;
8
8
  let redirections = redirectionConfig.environments;
9
9
  let environmentVariables;
10
- suffix = topLevelDomainsV2.find((s) => origin.endsWith(s));
10
+ suffix = topLevelDomainsV2 && topLevelDomainsV2.length > 0 ? topLevelDomainsV2.find((s) => origin.endsWith(s)) : undefined;
11
11
  if (suffix) {
12
12
  redirections = redirectionConfig.environments_v2;
13
13
  environmentVariables = {};
14
14
  }
15
15
  else {
16
- suffix = topLevelDomains.find((s) => origin.endsWith(s));
16
+ suffix = topLevelDomains && topLevelDomains.length > 0 ? topLevelDomains.find((s) => origin.endsWith(s)) : undefined;
17
17
  environmentVariables = redirectionConfig.environmentVariables;
18
18
  }
19
19
  if (suffix) {
package/src/lib/utils.js CHANGED
@@ -104,13 +104,11 @@ export function createInFlightDedupe() {
104
104
  return (factory) => __awaiter(this, void 0, void 0, function* () {
105
105
  if (inFlight)
106
106
  return inFlight;
107
- console.log('11111111111111');
108
107
  const promise = (() => __awaiter(this, void 0, void 0, function* () {
109
108
  try {
110
109
  return yield factory();
111
110
  }
112
111
  finally {
113
- console.log('inFlight-------------------- cleanup');
114
112
  inFlight = undefined;
115
113
  }
116
114
  }))();