Skip to content

Commit 40c19b1

Browse files
fix: correct isNewProgress0 logic to check percentCompleted === 0
1 parent cd129fb commit 40c19b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ const updateTaskStatus = async (req, res, next) => {
375375
const isCurrProgress100 = parseInt(task.taskData.percentCompleted || 0) === 100;
376376
const isCurrProgress0 = parseInt(task.taskData.percentCompleted || 0) === 0;
377377
const isNewProgress100 = !!req.body.percentCompleted && parseInt(req.body.percentCompleted) === 100;
378-
const isNewProgress0 = !!req.body.percentCompleted !== undefined && parseInt(req.body.percentCompleted) === 0;
378+
const isNewProgress0 = req.body.percentCompleted !== undefined && parseInt(req.body.percentCompleted) === 0;
379379

380380
if (
381381
!isCurrProgress100 &&

0 commit comments

Comments
 (0)