mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Delete unused unsubmitted objects
This commit is contained in:
parent
ddca15ca01
commit
c66e624c16
1 changed files with 6 additions and 2 deletions
|
@ -556,7 +556,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||
sponsorTimes.splice(index, 1);
|
||||
|
||||
//save this
|
||||
if (sponsorTimes.length > 0) {
|
||||
Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID] = sponsorTimes;
|
||||
} else {
|
||||
delete Config.config.unsubmittedSegments[this.props.contentContainer().sponsorVideoID];
|
||||
}
|
||||
Config.forceUpdate("unsubmittedSegments");
|
||||
|
||||
this.props.contentContainer().updatePreviewBar();
|
||||
|
|
Loading…
Reference in a new issue