Skip to content

Commit

Permalink
fix: fails to log when a task is selected (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
eatgrass committed Jan 17, 2024
1 parent d8dfca0 commit 3a3725b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ export default class Timer implements Readable<TimerStore> {
? { ...this.plugin.tracker.task }
: { ...DEFAULT_TASK }

task.path = this.plugin.tracker?.file?.path ?? ''
task.fileName = this.plugin.tracker?.file?.name ?? ''
if(!task.path) {
task.path = this.plugin.tracker?.file?.path ?? ''
task.fileName = this.plugin.tracker?.file?.name ?? ''
}

return { ...state, task }
}

Expand Down

0 comments on commit 3a3725b

Please sign in to comment.