🐛 Fix "no file selected" detection

Got broken in fix for #4212, thanks @cp2004 for the
heads-up.
This commit is contained in:
Gina Häußge committed 2021-11-22 12:06:23 +01:00
1 parent 1d29d718ba
commit 008d787e7f
1 file changed
+10 -8
@@ -337,7 +337,7 @@ $(function () {
};
self.highlightFile = function (file) {
if (!file) {
if (!file || !file.origin || !file.path) {
self.listHelper.selectNone();
return;
}
@@ -352,13 +352,15 @@ $(function () {
}
});
if (!result) {
log.info(
"Couldn't find file " +
file.origin +
":" +
file.path +
" in current items, not selecting"
);
if (log.getLevel() <= log.levels.DEBUG) {
log.info(
"Couldn't find file " +
file.origin +
":" +
file.path +
" in current items, not selecting"
);
}
self.listHelper.selectNone();
}
};