improve(worker): handle sessions with unknown state

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-09 20:39:52 +01:00
parent b9d071dbbb
commit af0f9717a8
3 changed files with 34 additions and 4 deletions

View File

@@ -271,7 +271,7 @@ async function track({
// Prioritize 'screen_view' events by setting no delay
// This ensures that session starts are created from 'screen_view' events
// rather than other events, maintaining accurate session tracking
delay: payload.name === 'screen_view' ? undefined : 1000,
delay: isScreenView ? undefined : 1000,
},
);
}