Delete unused unsubmitted objects

This commit is contained in:
Ajay 2022-02-06 17:01:14 -05:00
parent ddca15ca01
commit c66e624c16

View file

@ -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();