Skip to content

Commit

Permalink
fix(import): 🐛 treat due dates in 1970 as missing (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNZL committed Jul 4, 2024
1 parent 6f1a590 commit 6424e49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/popup/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export async function exportToNotion(): Promise<void | IFetchedAssignment[]> {
.flat()
.map(assignment => new FetchedAssignment(assignment))
.filter(assignment => {
if (!assignment.due) return canvasOptions.importMissingDueDates;
if (!assignment.due || (new Date(assignment.due).getFullYear() === 1970)) return canvasOptions.importMissingDueDates;
return Date.parse(assignment.due) > Date.now();
});
}
Expand Down

0 comments on commit 6424e49

Please sign in to comment.