don't crash when removing an item from the breadcrump that isn't added properly

This commit is contained in:
Robin Appelman 2011-01-04 22:31:04 +01:00
parent 5a05da2af2
commit b705b95a1e
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ OC_FILES.browser.breadcrumb.add=function(name,path){
OC_FILES.browser.breadcrumb.remove=function(path){
if(OC_FILES.browser.breadcrumb.crumbs[path]){
var div=OC_FILES.browser.breadcrumb.crumbs[path];
div.parentNode.removeChild(div);
if(div.parentNode){
div.parentNode.removeChild(div);
}
delete OC_FILES.browser.breadcrumb.crumbs[path];
}
}