Skip to content

Commit 92c1670

Browse files
committed
done
1 parent 5809208 commit 92c1670

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/app/src/pages/audit/file/index.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,20 @@ export default function AuditFilePage() {
8383
position: { x: number; y: number };
8484
data: NapiNodeData;
8585
}) => {
86+
if (value.data.customData.fileName !== params.file) {
87+
// ignore clicks on nodes from other files
88+
return;
89+
}
8690
setContextMenuPosition(value.position);
8791
setContextMenuOpen(true);
8892
setContextMenuSymbolId(value.data.customData.symbolName);
8993
},
9094
onAfterNodeDblClick: (data: NapiNodeData) => {
91-
// Navigate to the file, we don't have instance data in this visualizer
92-
const urlEncodedFileName = encodeURIComponent(
93-
data.customData.fileName,
95+
navigate(
96+
`/audit/${encodeURIComponent(
97+
data.customData.fileName,
98+
)}/${encodeURIComponent(data.customData.symbolName)}`,
9499
);
95-
navigate(`/audit/${urlEncodedFileName}`);
96100
},
97101
},
98102
);

0 commit comments

Comments
 (0)