Skip to content

Commit

Permalink
Fix: due date on Obsidian did not sync to Todoist
Browse files Browse the repository at this point in the history
This closes HeroBlackInk#64.
Making sure to pass the correct value to the date helper function.
  • Loading branch information
morficus committed Dec 1, 2023
1 parent 677e1b1 commit 0e43277
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/todoistRestAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@ export class TodoistRestAPI {
const api = await this.initializeAPI()
try {
if(dueDate){
dueDatetime = localDateStringToUTCDatetimeString(dueDatetime)
dueDate = null
dueDatetime = localDateStringToUTCDatetimeString(dueDate) || undefined
dueDate = undefined
}
const newTask = await api.addTask({
projectId,
content,
parentId,
dueDate,
dueDatetime,
labels,
description,
priority
Expand Down

0 comments on commit 0e43277

Please sign in to comment.