Merge pull request #887 from maximmax42/patch-1

Fix for an "enable category" popup
This commit is contained in:
Ajay Ramachandran 2021-08-14 21:54:16 -04:00 committed by GitHub
commit 93e5bf5033
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,7 +239,7 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
categorySelectionChange(event: React.ChangeEvent<HTMLSelectElement>): void {
// 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;
event.target.value = DEFAULT_CATEGORY;
@ -369,4 +369,4 @@ class SponsorTimeEditComponent extends React.Component<SponsorTimeEditProps, Spo
}
}
export default SponsorTimeEditComponent;
export default SponsorTimeEditComponent;