@mindline/sync 1.0.23 → 1.0.24

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/index.ts +6 -8
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -206,9 +206,6 @@ function DummyInit(ii: InitInfo)
206
206
  // Returns: users, targets, configs for each workspace
207
207
  export function InitGet(ii: InitInfo, instance: IPublicClientApplication, debug: boolean): boolean
208
208
  {
209
- if(debug)
210
- debugger;
211
-
212
209
  // if empty user array, retrieve dummy data from JSON to populate UI
213
210
  let l = ii.us.length;
214
211
  if(l === 0) return DummyInit(ii);
@@ -217,15 +214,15 @@ export function InitGet(ii: InitInfo, instance: IPublicClientApplication, debug:
217
214
  let user:User = ii.us[l-1];
218
215
  if(user.oid === "1") return true;
219
216
 
220
- // have real user: remove dummy user, target, config, workspace if they exist
217
+ // have real user: remove any dummy user, target, config, workspace if they exist
221
218
  let dummyIndex = ii.us.findIndex((u) => u.oid === "1");
222
- ii.us.splice(dummyIndex, 1);
219
+ if(dummyIndex!==-1) ii.us.splice(dummyIndex, 1);
223
220
  dummyIndex = ii.ts.findIndex((u) => u.tid === "1");
224
- ii.ts.splice(dummyIndex, 1);
221
+ if(dummyIndex!==-1) ii.ts.splice(dummyIndex, 1);
225
222
  dummyIndex = ii.cs.findIndex((u) => u.id === "1");
226
- ii.cs.splice(dummyIndex, 1);
223
+ if(dummyIndex!==-1) ii.cs.splice(dummyIndex, 1);
227
224
  dummyIndex = ii.ws.findIndex((u) => u.id === "1");
228
- ii.ws.splice(dummyIndex, 1);
225
+ if(dummyIndex!==-1) ii.ws.splice(dummyIndex, 1);
229
226
 
230
227
  // why would instance be null here? investigate!
231
228
  if(instance===null) {
@@ -234,6 +231,7 @@ export function InitGet(ii: InitInfo, instance: IPublicClientApplication, debug:
234
231
  }
235
232
 
236
233
  // valid user, query AAD for associated company name and domain
234
+ if(debug) debugger;
237
235
  getTenantInfo(user, instance);
238
236
  return true;
239
237
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mindline/sync",
3
3
  "type": "module",
4
- "version": "1.0.23",
4
+ "version": "1.0.24",
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.",