Use default action type from config

This commit is contained in:
Ajay Ramachandran
2021-10-14 00:03:48 -04:00
parent acd2720372
commit f2c1ee4894
2 changed files with 7 additions and 4 deletions

View File

@@ -365,9 +365,11 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
}
}
sponsorTimesSubmitting[this.props.index].category = this.categoryOptionRef.current.value as Category;
const category = this.categoryOptionRef.current.value as Category
sponsorTimesSubmitting[this.props.index].category = category;
sponsorTimesSubmitting[this.props.index].actionType =
this.actionTypeOptionRef?.current ? this.actionTypeOptionRef.current.value as ActionType : ActionType.Skip;
this.actionTypeOptionRef?.current ? this.actionTypeOptionRef.current.value as ActionType
: CompileConfig.categorySupport[category];
Config.config.segmentTimes.set(this.props.contentContainer().sponsorVideoID, sponsorTimesSubmitting);