update isShared check (#828)

This commit is contained in:
Cilibiu Bogdan
2018-11-26 16:12:10 +02:00
committed by GitHub
parent 7364dbc1ee
commit ec4f1a673f

View File

@@ -46,11 +46,16 @@ export class ToggleSharedComponent implements OnInit {
isShared(selection) { isShared(selection) {
// workaround for shared files // 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 true;
} }
return ( return (
selection.first &&
selection.first.entry && selection.first.entry &&
selection.first.entry.properties && selection.first.entry.properties &&
!!selection.first.entry.properties['qshare:sharedId'] !!selection.first.entry.properties['qshare:sharedId']