Skip to content

Commit 5267190

Browse files
committed
Fix dr
1 parent cce0807 commit 5267190

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dr-lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ async function getSharingToken () {
271271
async function initStreams () {
272272
// check if the account is already initialized
273273
const resStreams = await drConnection.api([{ method: 'streams.get', params: { parentId: 'patients' } }]);
274-
if (resStreams[0].streams.length > 0) {
274+
if (resStreams[0]?.streams?.length > 0) {
275275
console.log('## Dr account streams already initialized');
276276
return;
277277
}

0 commit comments

Comments
 (0)