Skip to content

Commit

Permalink
Enforce category selection in product creator (#1337)
Browse files Browse the repository at this point in the history
  • Loading branch information
SektorDV authored and jwm0 committed Sep 3, 2021
1 parent 6cb744b commit 2dd7fee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/products/components/ProductCreatePage/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ function useProductCreateForm(
trackInventory: false,
weight: ""
};

const [changed, setChanged] = React.useState(false);
const triggerChange = () => setChanged(true);

Expand Down Expand Up @@ -312,7 +311,8 @@ function useProductCreateForm(
data.channelListings.some(
channel =>
validatePrice(channel.price) || validateCostPrice(channel.costPrice)
));
) ||
!data.category);

return {
change: handleChange,
Expand Down

0 comments on commit 2dd7fee

Please sign in to comment.