From ec4f1a673fbed31a188f838470a7f42c57dc975d Mon Sep 17 00:00:00 2001 From: Cilibiu Bogdan Date: Mon, 26 Nov 2018 16:12:10 +0200 Subject: [PATCH] update isShared check (#828) --- .../shared/toggle-shared/toggle-shared.component.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/components/shared/toggle-shared/toggle-shared.component.ts b/src/app/components/shared/toggle-shared/toggle-shared.component.ts index 57b37b89bc..bc037df33b 100644 --- a/src/app/components/shared/toggle-shared/toggle-shared.component.ts +++ b/src/app/components/shared/toggle-shared/toggle-shared.component.ts @@ -46,11 +46,16 @@ export class ToggleSharedComponent implements OnInit { isShared(selection) { // workaround for shared files - if (selection.first.entry && selection.first.entry.sharedByUser) { + if ( + selection.first && + selection.first.entry && + selection.first.entry.sharedByUser + ) { return true; } return ( + selection.first && selection.first.entry && selection.first.entry.properties && !!selection.first.entry.properties['qshare:sharedId']