Skip to content
Snippets Groups Projects
Commit 54ee6a22 authored by Princelle Maxime's avatar Princelle Maxime :gay_pride_flag:
Browse files

:rotating_light: fix warning on add_product

parent cf20f851
Branches
1 merge request!7🔀 V1
......@@ -20,7 +20,7 @@ const AddProduct = () => {
}, []);
function createItem() {
if (category_id !== "n/a" && name != "" && price > 0 && priceAdherant > 0 && stock > 0) {
if (category_id !== "n/a" && name !== "" && price > 0 && priceAdherant > 0 && stock > 0) {
console.log("Creating item: " + name + " " + price + " " + priceAdherant + " " + stock + " " + category_id);
addItem(name, price, priceAdherant, stock, category_id).then((data) => {
console.log(data);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment