diff options
author | Ajay Ramachandran <[email protected]> | 2020-12-20 18:51:44 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-20 18:51:44 -0500 |
commit | 24df146c537bfbe6821a756036106fefc1071a96 (patch) | |
tree | 8fb9263b4c49e60f2a48c24afe249d789b76a950 | |
parent | 1bab5063aaa5e48c2565ceb3cf27441ea5bb62e7 (diff) | |
parent | bc106903040ff750e8ab51ba93b04ca3ef55f64d (diff) | |
download | SponsorBlock-24df146c537bfbe6821a756036106fefc1071a96.tar.gz SponsorBlock-24df146c537bfbe6821a756036106fefc1071a96.zip |
Merge pull request #586 from MRuy/master
Ensure correct start- endtime order
-rw-r--r-- | src/content.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/content.ts b/src/content.ts index 5371016a..a77730c2 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1181,6 +1181,7 @@ function startSponsorClicked() { if (sponsorTimesSubmitting.length > 0 && sponsorTimesSubmitting[sponsorTimesSubmitting.length - 1].segment.length < 2) { //it is an end time sponsorTimesSubmitting[sponsorTimesSubmitting.length - 1].segment[1] = getRealCurrentTime(); + sponsorTimesSubmitting[sponsorTimesSubmitting.length - 1].segment.sort((a, b) => a > b ? 1 : (a < b ? -1 : 0)); } else { //it is a start time sponsorTimesSubmitting.push({ |