Skip to content

Commit 6eb56e9

Browse files
author
Noam Kfir
committed
Render stack frame path correctly when either module path or function name are empty
1 parent 2f6ddb6 commit 6eb56e9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/views/codeAnalytics/errorFlowStackRenderer.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,16 @@ export class ErrorFlowStackRenderer {
265265

266266
private static getFrameItemHtml(frame: FrameViewModel)
267267
{
268-
const functionName = frame.functionName?.trim().length > 0 ? ` in ${frame.functionName}` : '';
269-
const path = frame.modulePhysicalPath + functionName;
268+
const pathParts = [];
269+
const modulePath = frame.modulePhysicalPath;
270+
if(modulePath) {
271+
pathParts.push(modulePath);
272+
}
273+
const functionName = frame.functionName?.trim();
274+
if(functionName.length > 0) {
275+
pathParts.push(functionName);
276+
}
277+
const path = pathParts.join(' in ');
270278
const selectedClass = frame.selected ? "selected" : "";
271279
const disabledClass = frame.workspaceUri ? "" : "disabled";
272280
const hidden = Settings.hideFramesOutsideWorkspace.value && !frame.workspaceUri ? "hidden" : "";

0 commit comments

Comments
 (0)