diff --git a/src/octoprint/static/js/app/viewmodels/files.js b/src/octoprint/static/js/app/viewmodels/files.js index 94b1c9297..10d268c70 100644 --- a/src/octoprint/static/js/app/viewmodels/files.js +++ b/src/octoprint/static/js/app/viewmodels/files.js @@ -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(); } };