Skip to content

Commit c5f9821

Browse files
committed
Fixes moment rounding bug with mermaid gantt chart
1 parent 1100f10 commit c5f9821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mermaid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class PlannerMermaid {
3636
}
3737
const currentMoment = moment(item.time);
3838
const nextMoment = moment(next.time);
39-
const untilNext = moment.duration(nextMoment.diff(currentMoment)).asMinutes();
39+
const untilNext = Math.floor(moment.duration(nextMoment.diff(currentMoment)).asMinutes());
4040
return ', ' + untilNext + 'mm';
4141
}
4242

0 commit comments

Comments
 (0)