From 1902e52c7743e3251112ce1427c5f72bb3832947 Mon Sep 17 00:00:00 2001 From: dwfliplet <144125903+dwfliplet@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:20:52 +0100 Subject: [PATCH] fix(ID-3973): fixed possibility to navigate to search result path (#102) --- js/interface.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/interface.js b/js/interface.js index 27b864b..af6040d 100644 --- a/js/interface.js +++ b/js/interface.js @@ -363,8 +363,8 @@ function getFolderContentsById(id, type, isSearchNav) { mediaFiles.forEach(parseThumbnail); - mediaFolders.forEach(addFolder); - mediaFiles.forEach(addFile); + mediaFolders.forEach((folder) => addFolder(folder)); + mediaFiles.forEach(file =>addFile(file)); renderList(); } @@ -1338,9 +1338,9 @@ function renderSearchResult(result, searchType) { .map(function(item) { item.relativePath = calculatePath(item); - if (item.parentId) { + if (item.parentId || item.mediaFolderId) { item.parentItemType = 'folder'; - item.parentItemId = item.parentId; + item.parentItemId = item.parentId || item.mediaFolderId; } else if (item.appId) { item.parentItemType = 'app'; item.parentItemId = item.appId;