diff --git a/src/extension.ts b/src/extension.ts index 44b1ebb..da24e01 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -239,7 +239,7 @@ function setActivity(workspaceElapsedTime: boolean = false): void { activity = { details: generateDetails('detailsDebugging', 'detailsEditing', 'detailsIdle'), state: generateDetails('lowerDetailsDebugging', 'lowerDetailsEditing', 'lowerDetailsIdle'), - startTimestamp: previousTimestamp && workspaceElapsedTime ? previousTimestamp : new Date().getTime() / 1000, + startTimestamp: window.activeTextEditor && previousTimestamp && workspaceElapsedTime ? previousTimestamp : window.activeTextEditor ? new Date().getTime() / 1000 : null, largeImageKey: largeImageKey ? largeImageKey.image || largeImageKey