Skip to content

Commit 551328b

Browse files
committed
electron: fix sessionId build errors
1 parent c7b6149 commit 551328b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/electron/src/main/modules/BacktraceMainElectronModule.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ export class BacktraceMainElectronModule implements BacktraceModule {
149149
) {
150150
// Sort crashes and sessions by timestamp descending
151151
const crashes = crashReporter.getUploadedReports().sort((a, b) => b.date.getTime() - a.date.getTime());
152-
const previousSessions = session.getPreviousSessions().sort((a, b) => b.timestamp - a.timestamp);
152+
const previousSessions = session
153+
.getPreviousSessions()
154+
.sort((a, b) => b.sessionId.timestamp - a.sessionId.timestamp);
153155

154156
for (const crash of crashes) {
155157
const rxid = this.getCrashRxid(crash.id);
@@ -159,7 +161,7 @@ export class BacktraceMainElectronModule implements BacktraceModule {
159161

160162
try {
161163
// Get first session that happened before the crash
162-
const session = previousSessions.find((p) => p.timestamp < crash.date.getTime());
164+
const session = previousSessions.find((p) => p.sessionId.timestamp < crash.date.getTime());
163165
// If there is no such session, there won't be any other sessions
164166
if (!session) {
165167
break;

0 commit comments

Comments
 (0)