diff --git a/app/templates/local_workspace.html b/app/templates/local_workspace.html index f1b0efa..e51d435 100644 --- a/app/templates/local_workspace.html +++ b/app/templates/local_workspace.html @@ -176,9 +176,10 @@ function wsPage() { flattenTree(nodes, depth) { const result = []; for (const node of nodes) { + const isFolder = node.type === 'folder'; result.push({ - db_id: node.id, name: node.name, icon: node.is_folder ? '📁' : '📄', - is_folder: node.is_folder, depth: depth, + db_id: node.id, name: node.name, icon: isFolder ? '📁' : '📄', + is_folder: isFolder, depth: depth, }); if (node.children) { result.push(...this.flattenTree(node.children, depth + 1));