@verdocs/js-sdk 4.2.73 → 4.2.75
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/dist/index.js +20 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -21
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1287,27 +1287,26 @@ class VerdocsEndpoint {
|
|
|
1287
1287
|
if (this.persist) {
|
|
1288
1288
|
localStorage.setItem(this.sessionStorageKey(), token);
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
}
|
|
1290
|
+
// NOTE: We don't attempt to de-dupe session/network operations because there are cases where we
|
|
1291
|
+
// operate within an IFRAME and multiple siblings need to operate on the same session. This happens
|
|
1292
|
+
// a lot in Storybook but may also happen in other environments as well. Rather than try to coordinate
|
|
1293
|
+
// something weird that might break (e.g. in a mobile app), we just allow the dupe calls. We generate
|
|
1294
|
+
// a unique ID for each endpoint just to help with debugging. It should not be taken as a bug if more
|
|
1295
|
+
// than one endpoint ID is seen within the app's logs.
|
|
1296
|
+
window?.console?.debug('[JS_SDK] Loading current profile...', this.endpointId, this.sub, session.sub);
|
|
1297
|
+
this.sub = session.sub;
|
|
1298
|
+
getCurrentProfile(this)
|
|
1299
|
+
.then((r) => {
|
|
1300
|
+
window?.console?.debug('[JS_SDK] Loaded profile', this.endpointId, r);
|
|
1301
|
+
this.profile = r || null;
|
|
1302
|
+
this.notifySessionListeners();
|
|
1303
|
+
})
|
|
1304
|
+
.catch((e) => {
|
|
1305
|
+
this.profile = null;
|
|
1306
|
+
this.sub = null;
|
|
1307
|
+
window?.console?.warn('Unable to load profile', e);
|
|
1308
|
+
this.notifySessionListeners();
|
|
1309
|
+
});
|
|
1311
1310
|
return this;
|
|
1312
1311
|
}
|
|
1313
1312
|
/**
|