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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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']