Skip to content

Commit

Permalink
exclude todos without due date from expired filter
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorVilas committed Jan 14, 2023
1 parent c051227 commit 8027199
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/todoHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ export const todoHandler = (() => {
local.forEach((thisProject, projectIdx) => thisProject.todos.forEach((thisTodo, todoIdx) => {
const formatDate = thisTodo.dateDue.split("-").join(",");
if(!isFuture(new Date(formatDate))
&& !isToday(new Date(formatDate))){
&& !isToday(new Date(formatDate))
&& thisTodo.dateDue.length > 0){
thisTodo.projectIdx = projectIdx;
thisTodo.todoIdx = todoIdx;
filtered.todos.push(thisTodo);
Expand Down

0 comments on commit 8027199

Please sign in to comment.