authscape 1.0.674 → 1.0.678

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/index.js CHANGED
@@ -9207,39 +9207,44 @@ function _PrivateLabelPageModule() {
9207
9207
  case 4:
9208
9208
  response = _context.sent;
9209
9209
  if (!(response.status == 200)) {
9210
- _context.next = 10;
9210
+ _context.next = 16;
9211
9211
  break;
9212
9212
  }
9213
9213
  _context.next = 8;
9214
9214
  return response.json();
9215
9215
  case 8:
9216
9216
  dataResponse = _context.sent;
9217
- if (dataResponse != null) {
9218
- if (dataResponse.companyId != null) {
9219
- data.oemCompanyId = dataResponse.companyId;
9220
- }
9221
- if (dataResponse.demoCompanyId != null) {
9222
- data.demoId = dataResponse.demoCompanyId;
9223
- }
9224
- if (dataResponse.favIcon != null) {
9225
- data.favIcon = dataResponse.favIcon;
9226
- }
9227
- if (dataResponse.companyName != null) {
9228
- data.companyName = dataResponse.companyName;
9229
- }
9217
+ if (!(dataResponse != null)) {
9218
+ _context.next = 16;
9219
+ break;
9220
+ }
9221
+ if (dataResponse.companyId != null) {
9222
+ data.oemCompanyId = dataResponse.companyId;
9223
+ }
9224
+ if (dataResponse.demoCompanyId != null) {
9225
+ data.demoId = dataResponse.demoCompanyId;
9226
+ }
9227
+ if (dataResponse.favIcon != null) {
9228
+ data.favIcon = dataResponse.favIcon;
9229
+ }
9230
+ if (dataResponse.companyName != null) {
9231
+ data.companyName = dataResponse.companyName;
9232
+ }
9230
9233
 
9231
- // check for redirect
9232
- if (dataResponse.redirectTrafficToCanonical) {
9233
- data.redirect = {
9234
- destination: dataResponse.canonicalBaseUrl,
9235
- // Replace with your target URL
9236
- permanent: false // Set to true for a permanent redirect (HTTP 308)
9237
- };
9238
- }
9234
+ // check for redirect
9235
+ if (!dataResponse.redirectTrafficToCanonical) {
9236
+ _context.next = 16;
9237
+ break;
9239
9238
  }
9240
- case 10:
9239
+ return _context.abrupt("return", {
9240
+ redirect: {
9241
+ destination: dataResponse.canonicalBaseUrl,
9242
+ permanent: false
9243
+ }
9244
+ });
9245
+ case 16:
9241
9246
  return _context.abrupt("return", data);
9242
- case 11:
9247
+ case 17:
9243
9248
  case "end":
9244
9249
  return _context.stop();
9245
9250
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.674",
3
+ "version": "1.0.678",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -41,10 +41,12 @@ export async function PrivateLabelPageModule(apiUri, host) {
41
41
  // check for redirect
42
42
  if (dataResponse.redirectTrafficToCanonical)
43
43
  {
44
- data.redirect = {
45
- destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
46
- permanent: false, // Set to true for a permanent redirect (HTTP 308)
47
- }
44
+ return {
45
+ redirect: {
46
+ destination: dataResponse.canonicalBaseUrl,
47
+ permanent: false,
48
+ },
49
+ };
48
50
  }
49
51
  }
50
52
  }