mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-09-20 13:03:45 +02:00
Fix for an "enable category" popup
If you choose any category when editing a segment, and then choose the "Choose a category" one, it triggers the enable category message with an empty category name. This is a fix for that.
This commit is contained in:
parent
f01a1ae4ec
commit
1bd78ec1c4
1 changed files with 2 additions and 2 deletions
|
@ -239,7 +239,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
|
||||||
|
|
||||||
categorySelectionChange(event: React.ChangeEvent<HTMLSelectElement>): void {
|
categorySelectionChange(event: React.ChangeEvent<HTMLSelectElement>): void {
|
||||||
// See if show more categories was pressed
|
// See if show more categories was pressed
|
||||||
if (!Config.config.categorySelections.some((category) => category.name === event.target.value)) {
|
if (event.target.value !== DEFAULT_CATEGORY && !Config.config.categorySelections.some((category) => category.name === event.target.value)) {
|
||||||
const chosenCategory = event.target.value;
|
const chosenCategory = event.target.value;
|
||||||
event.target.value = DEFAULT_CATEGORY;
|
event.target.value = DEFAULT_CATEGORY;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue