From 1bd78ec1c4cdac5a0f6d11419a3317f01744a543 Mon Sep 17 00:00:00 2001 From: Maxim Date: Sun, 15 Aug 2021 02:42:47 +0500 Subject: 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. --- src/components/SponsorTimeEditComponent.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SponsorTimeEditComponent.tsx b/src/components/SponsorTimeEditComponent.tsx index 483ddbae..3de70141 100644 --- a/src/components/SponsorTimeEditComponent.tsx +++ b/src/components/SponsorTimeEditComponent.tsx @@ -239,7 +239,7 @@ class SponsorTimeEditComponent extends React.Component): 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