Skip to content

Commit c486cf8

Browse files
committed
Fixing null clientData
1 parent d6ad54f commit c486cf8

7 files changed

Lines changed: 8 additions & 8 deletions

File tree

docs/hds-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/hds-lib.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/tests-browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21165,7 +21165,7 @@ class AppClientAccount extends Application {
2116521165
const [accessesRes, eventRes] = await this.connection.api(apiCalls);
2116621166
const accessHDSCollectorMap = {};
2116721167
for (const access of accessesRes.accesses) {
21168-
if (access.clientData.hdsCollectorClient) {
21168+
if (access.clientData?.hdsCollectorClient) {
2116921169
accessHDSCollectorMap[access.name] = access;
2117021170
}
2117121171
}
@@ -21989,7 +21989,7 @@ class CollectorClient {
2198921989
app;
2199021990
/** @type {PryvEvent} */
2199121991
eventData;
21992-
/** @type {Object} - when active or deactivated - there is a link with accessData */
21992+
/** @type {pryv.Access} - when active or deactivated - there is a link with accessData */
2199321993
accessData;
2199421994
/** @type {CollectorRequest} */
2199521995
request;

docs/tests-browser.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/appTemplates/AppClientAccount.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class AppClientAccount extends Application {
8484
const [accessesRes, eventRes] = await this.connection.api(apiCalls);
8585
const accessHDSCollectorMap = {};
8686
for (const access of accessesRes.accesses) {
87-
if (access.clientData.hdsCollectorClient) {
87+
if (access.clientData?.hdsCollectorClient) {
8888
accessHDSCollectorMap[access.name] = access;
8989
}
9090
}

src/appTemplates/CollectorClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class CollectorClient {
1818
app;
1919
/** @type {PryvEvent} */
2020
eventData;
21-
/** @type {Object} - when active or deactivated - there is a link with accessData */
21+
/** @type {pryv.Access} - when active or deactivated - there is a link with accessData */
2222
accessData;
2323
/** @type {CollectorRequest} */
2424
request;

types/appTemplates/CollectorClient.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare class CollectorClient {
3030
/** @type {PryvEvent} */
3131
eventData: pryv.Event;
3232
/** @type {Object} - when active or deactivated - there is a link with accessData */
33-
accessData: any;
33+
accessData?: pryv.Access;
3434
/** @property {String} - identified within user's account - can be used to retreive a Collector Client from an app */
3535
get key(): string;
3636
/** @property {String} - id matching an event within requester's account - used as a reference to communicate with requester */

0 commit comments

Comments
 (0)