refactor(key) switchKey PAGE_UP: rm tryCatch

This commit is contained in:
coderaiser 2014-10-29 04:35:46 -04:00
parent cc494e486f
commit dd3c3ac441

View file

@ -365,6 +365,7 @@ var CloudCmd, Util, DOM;
current = current.nextSibling;
}
DOM.setCurrentFile(current);
Events.preventDefault(event);
break;
@ -373,18 +374,8 @@ var CloudCmd, Util, DOM;
case Key.PAGE_UP:
DOM.scrollByPages(panel, -1);
var tryCatch = function(pCurrentFile) {
Util.exec.try(function() {
return pCurrentFile
.previousSibling
.previousSibling
.previousSibling
.previousSibling;
});
};
for (i = 0; i < 30; i++) {
if (!current.previousSibling || tryCatch(current) )
if (!current.previousSibling)
break;
current = current.previousSibling;