aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2020-12-20 18:51:44 -0500
committerGitHub <[email protected]>2020-12-20 18:51:44 -0500
commit24df146c537bfbe6821a756036106fefc1071a96 (patch)
tree8fb9263b4c49e60f2a48c24afe249d789b76a950
parent1bab5063aaa5e48c2565ceb3cf27441ea5bb62e7 (diff)
parentbc106903040ff750e8ab51ba93b04ca3ef55f64d (diff)
downloadSponsorBlock-24df146c537bfbe6821a756036106fefc1071a96.tar.gz
SponsorBlock-24df146c537bfbe6821a756036106fefc1071a96.zip
Merge pull request #586 from MRuy/master
Ensure correct start- endtime order
-rw-r--r--src/content.ts1
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({