Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit b726bf0

Browse files
authored
Update hasTimes.js
fix: handle the minus time in deletion
1 parent 03acdeb commit b726bf0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/models/hasTimes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class hasTimes extends Base {
8989

9090
// create a time string and a time object
9191
let timeString = match ? match[1] : (minusMatch ? `-${minusMatch}` : `-${Time.toHumanReadable(timeSpent)}`);
92+
timeString = delMatch ? minusMatch.startsWith('-') ? minusMatch.replace('-', '') : `-${minusMatch}` : timeString;
9293
let time = new Time(null, created, note, this, this.config);
9394
time.seconds = Time.parse(timeString, 8, 5, 4);
9495

0 commit comments

Comments
 (0)