Merge pull request #5134 from owncloud/trashbin-homeiconbroken

Do not call changeDirectory() when no dir set on breadcrumb
This commit is contained in:
Vincent Petry 2013-10-09 09:01:43 -07:00
commit 3a3819b303
1 changed files with 6 additions and 3 deletions

View File

@ -703,7 +703,10 @@ function checkTrashStatus() {
}
function onClickBreadcrumb(e){
var $el = $(e.target).closest('.crumb');
e.preventDefault();
FileList.changeDirectory(decodeURIComponent($el.data('dir')));
var $el = $(e.target).closest('.crumb'),
$targetDir = $el.data('dir');
if ($targetDir !== undefined){
e.preventDefault();
FileList.changeDirectory(decodeURIComponent($targetDir));
}
}