File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
pages/PageProducts/components Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export default function Cart() {
2121 ) . then ( ( { data : { data : { cart } } } ) => {
2222 dispatch ( updateFromApi ( cart ) )
2323 } ) ;
24- } , [ ] ) ;
24+ } , [ dispatch ] ) ;
2525 const cartItems = useSelector ( selectCartItems ) ;
2626 const badgeContent = cartItems . length || undefined ;
2727
Original file line number Diff line number Diff line change 3030 {
3131 "count" : 7 ,
3232 "description" : " Short Product Description2" ,
33- "id" : " 7567ec4b-b10c-48c5-9345-fc73c48a80a2 " ,
33+ "id" : " 7567ec4b-b10c-48c5-9345-fc73c48a80a3 " ,
3434 "price" : 23 ,
3535 "title" : " Product"
3636 },
Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ axios.interceptors.response.use(
1313 return response ;
1414 } ,
1515 function ( error ) {
16- if ( error . response . status === 400 ) {
16+ if ( error ? .response ? .status === 400 ) {
1717 alert ( error . response . data ?. data ) ;
1818 }
19- return Promise . reject ( error . response ) ;
19+
20+ return Promise . reject ( error ?. response ?? error ) ;
2021 }
2122) ;
2223
You can’t perform that action at this time.
0 commit comments