Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ const FrameHeading: React.FC<Props> = ({ stackframe, isLibraryFrame }) => {
? LibraryFrameFileDetail
: AppFrameFileDetail;
const lineNumber = stackframe.line.number;

const name =
'filename' in stackframe ? stackframe.filename : stackframe.classname;

return (
<FileDetails>
<FileDetail>{stackframe.filename}</FileDetail> in{' '}
<FileDetail>{name}</FileDetail> in{' '}
<FileDetail>{stackframe.function}</FileDetail>
{lineNumber > 0 && (
<Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

interface IStackframeBase {
filename: string;
type IStackframeBase = {
function?: string;
library_frame?: boolean;
exclude_from_grouping?: boolean;
Expand All @@ -19,13 +18,13 @@ interface IStackframeBase {
line: {
number: number;
};
}
} & ({ classname: string } | { filename: string });

export interface IStackframeWithLineContext extends IStackframeBase {
export type IStackframeWithLineContext = IStackframeBase & {
line: {
number: number;
context: string;
};
}
};

export type IStackframe = IStackframeBase | IStackframeWithLineContext;