Files
2024-02-15 17:01:50 +00:00

20 lines
389 B
TypeScript

import type {StacktraceType, Thread} from 'sentry/types';
function getThreadStacktrace(raw: boolean, thread?: Thread): StacktraceType | undefined {
if (!thread) {
return undefined;
}
if (raw && thread.rawStacktrace) {
return thread.rawStacktrace;
}
if (thread.stacktrace) {
return thread.stacktrace;
}
return undefined;
}
export default getThreadStacktrace;