Web: Files: fixed selectUpper

This commit is contained in:
Nikita Gopienko 2022-02-10 12:44:25 +03:00
parent 76a1c392c2
commit b066587fdc

View File

@ -416,14 +416,12 @@ class HotkeyStore {
get prevFile() {
const { filesList, selection, hotkeyCaret } = this.filesStore;
if (filesList.length && selection.length && hotkeyCaret) {
if (this.caretIndex !== -1) {
const prevCaretIndex = this.caretIndex - 1;
return filesList[prevCaretIndex];
} else {
console.log("TODO");
return null;
}
if (this.caretIndex !== -1) {
const prevCaretIndex = this.caretIndex - 1;
return filesList[prevCaretIndex];
} else {
console.log("TODO");
return null;
}
}