mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 20:17:05 +03:00
Fix undefined error when making segment
This commit is contained in:
@@ -458,8 +458,8 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
|||||||
sponsorTimesSubmitting[this.props.index].category = category;
|
sponsorTimesSubmitting[this.props.index].category = category;
|
||||||
|
|
||||||
const inputActionType = this.actionTypeOptionRef?.current?.value as ActionType;
|
const inputActionType = this.actionTypeOptionRef?.current?.value as ActionType;
|
||||||
const actionType = inputActionType && CompileConfig.categorySupport[category].includes(inputActionType) ? inputActionType as ActionType
|
const actionType = inputActionType && CompileConfig.categorySupport[category]?.includes(inputActionType) ? inputActionType as ActionType
|
||||||
: CompileConfig.categorySupport[category][0];
|
: CompileConfig.categorySupport[category]?.[0] ?? ActionType.Skip;
|
||||||
sponsorTimesSubmitting[this.props.index].actionType = actionType;
|
sponsorTimesSubmitting[this.props.index].actionType = actionType;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user