mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
fix(timeline.utils): handle null date inputs in difference calculation
This commit is contained in:
1 parent
4e051ded24
commit
67a0c5fb3c
2 files changed
+2
-5
No files matched your search
@@ -160,6 +160,8 @@ export default {
|
||||
},
|
||||
|
||||
_getDifferenceInMinutes(date1, date2) {
|
||||
if (!date1 || !date2) return 0
|
||||
|
||||
let diff = (date1.getTime() - date2.getTime()) / 1000
|
||||
diff /= 60
|
||||
return Math.abs(Math.round(diff))
|
||||
|
||||
Reference in new issue
Block a user