We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cce0807 commit 5267190Copy full SHA for 5267190
1 file changed
dr-lib.js
@@ -271,7 +271,7 @@ async function getSharingToken () {
271
async function initStreams () {
272
// check if the account is already initialized
273
const resStreams = await drConnection.api([{ method: 'streams.get', params: { parentId: 'patients' } }]);
274
- if (resStreams[0].streams.length > 0) {
+ if (resStreams[0]?.streams?.length > 0) {
275
console.log('## Dr account streams already initialized');
276
return;
277
}
0 commit comments