From 7979d4ec33158325ac87f80db6bf0a11daa42dd5 Mon Sep 17 00:00:00 2001 From: Sameer Kavthekar Date: Sat, 8 Oct 2022 23:49:05 +0530 Subject: [PATCH] fix: Fixed bug while editing products in products list --- backend/seeder.js | 2 +- frontend/src/reducers/productReducers.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/seeder.js b/backend/seeder.js index 6e1e736..4d1a0ad 100644 --- a/backend/seeder.js +++ b/backend/seeder.js @@ -8,7 +8,7 @@ const Carousel = require('./models/carouselModel') const Category = require('./models/categoryModel') const Product = require('./models/productModel') const Order = require('./models/orderModel') -const connectDB = require('./config/db') +const { connectDB } = require('./config/db') dotenv.config() diff --git a/frontend/src/reducers/productReducers.js b/frontend/src/reducers/productReducers.js index 571901b..7950c2f 100644 --- a/frontend/src/reducers/productReducers.js +++ b/frontend/src/reducers/productReducers.js @@ -76,7 +76,7 @@ export const productDetailsReducer = (state = { product: {} }, action) => { case PRODUCT_DETAILS_FAIL: return { loading: false, error: action.payload } case PRODUCT_DETAILS_RESET: - return {} + return {product: {}} default: return state }