guard against a typeError

pull/1/head
ansuz 4 years ago
parent 9bc27d7d0d
commit 13b3fd1973

@ -1854,7 +1854,7 @@ define([
// In list mode, display metadata from the filesData object // In list mode, display metadata from the filesData object
var _addOwnership = function ($span, $state, data) { var _addOwnership = function ($span, $state, data) {
if (data.owners && data.owners.indexOf(edPublic) !== -1) { if (data && Array.isArray(data.owners) && data.owners.indexOf(edPublic) !== -1) :
var $owned = $ownedIcon.clone().appendTo($state); var $owned = $ownedIcon.clone().appendTo($state);
$owned.attr('title', Messages.fm_padIsOwned); $owned.attr('title', Messages.fm_padIsOwned);
$span.addClass('cp-app-drive-element-owned'); $span.addClass('cp-app-drive-element-owned');

Loading…
Cancel
Save