Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Fixed bug while editing products in products list #88

Merged
merged 1 commit into from
Oct 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/seeder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/reducers/productReducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down