From 15a41e3fffa8ec8cc9bdeb672ebb7592b685be75 Mon Sep 17 00:00:00 2001 From: Bogdan Cilibiu Date: Mon, 26 Nov 2018 11:29:44 +0200 Subject: [PATCH] update isShared selection check --- .../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 57b37b89b..bc037df33 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']