Skip to content

Commit

Permalink
fix: package info does not shows (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly authored Nov 26, 2023
1 parent abcd9c8 commit b1c2e77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/js/master.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ document.addEventListener("DOMContentLoaded", async () => {

async function updateShowInfoMenu(params) {
if (params.nodes.length === 0) {
currentNodeParams = null;
return PackageInfo.close();
}

Expand All @@ -83,6 +84,10 @@ document.addEventListener("DOMContentLoaded", async () => {
// Defines level of dependency. 0 is the root node, 1 is the first level of dependency, etc.
let level = 0;
document.addEventListener("keydown", (event) => {
if (currentNodeParams === null) {
currentNodeParams = rootNodeParams;
}

const nodeDependencyName = secureDataSet.linker.get(currentNodeParams.nodes[0]).name;
const usedBy = [...secureDataSet.linker].filter(([id, opt]) => Object.keys(secureDataSet.linker.get(currentNodeParams.nodes[0]).usedBy).includes(opt.name));
const use = [...secureDataSet.linker].filter(([id, opt]) => Reflect.has(opt.usedBy, nodeDependencyName));
Expand Down

0 comments on commit b1c2e77

Please sign in to comment.