Skip to content

Commit 41eded5

Browse files
committed
Instantiate second timestamp as Date instance
1 parent 33a46cc commit 41eded5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/controllers/project.controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function updateProject(req, res) {
2020
res.status(403).send({ success: false, message: 'Session does not match owner of project.' });
2121
return;
2222
}
23-
if (req.body.updatedAt && isAfter(new Date(project.updatedAt), req.body.updatedAt)) {
23+
if (req.body.updatedAt && isAfter(new Date(project.updatedAt), new Date(req.body.updatedAt))) {
2424
res.status(409).send({ success: false, message: 'Attempted to save stale version of project.' });
2525
return;
2626
}

0 commit comments

Comments
 (0)