@mindline/sync 1.0.27 → 1.0.29

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.
Files changed (2) hide show
  1. package/hybridspa.ts +1 -3
  2. package/package.json +1 -1
package/hybridspa.ts CHANGED
@@ -89,8 +89,6 @@ function seeProfile(spaCode: string, instance: IPublicClientApplication) {
89
89
 
90
90
  //Get Tenant Info
91
91
  export async function getTenantInfo(user: User, instance: IPublicClientApplication) {
92
- debugger;
93
-
94
92
  // do we already have a valid company name?
95
93
  if (typeof user.companyName !== 'undefined' && user.companyName !== "") return;
96
94
 
@@ -103,7 +101,7 @@ export async function getTenantInfo(user: User, instance: IPublicClientApplicati
103
101
  console.log("Tenant Info Endpoint: " + tenantEndpoint);
104
102
 
105
103
  // if needed, retrieve and cache access token
106
- if (user.accessToken === "") {
104
+ if (typeof user.accessToken === 'undefined' || user.accessToken === "") {
107
105
  try {
108
106
  let response = await instance.acquireTokenByCode({ code: user.spacode });
109
107
  user.accessToken = response.accessToken;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mindline/sync",
3
3
  "type": "module",
4
- "version": "1.0.27",
4
+ "version": "1.0.29",
5
5
  "types": "index.d.ts",
6
6
  "exports": "./index.ts",
7
7
  "description": "sync is a node.js package encapsulating javscript classes required for configuring Mindline sync service.",