Skip to content

Commit

Permalink
fix: negative actLen of the last activity
Browse files Browse the repository at this point in the history
  • Loading branch information
Z233 committed Oct 1, 2023
1 parent d218585 commit 01464e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ export class Scheduler {

// Assign floatOffsetValue to last activity
if (i === activities.length - 1) {
actLen += Math.round(floatOffsetValue)
if (actLen > 0) {
actLen += Math.round(floatOffsetValue)
}
}

const start = i > 0 ? arr[i - 1].stop : act.start
Expand Down

0 comments on commit 01464e5

Please sign in to comment.