diff --git a/src/assets/api.js b/src/assets/api.js index fa0c304a..d3ca1f18 100644 --- a/src/assets/api.js +++ b/src/assets/api.js @@ -163,8 +163,8 @@ export const handelResponse = (res, cb, errCb) => { cb(res.data, res.message) } else { if (res&&typeof errCb == 'function') { - Notify.clear(); - Notify.error(res.message); + Notify.clear(); + Notify.error(res.message); errCb(res.message) } } diff --git a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js index d0b774a0..d1ac84a1 100644 --- a/src/pages/distributor/adddistributorinfo/adddistributorinfo.js +++ b/src/pages/distributor/adddistributorinfo/adddistributorinfo.js @@ -201,9 +201,7 @@ export default class adduserinfo extends React.Component{ handelResponse(res,(response,msg)=>{ },err=>{ - Notify.clear(); - Notify.error(res.data.message); - return false; + }); }).catch(err=>{ @@ -215,9 +213,8 @@ export default class adduserinfo extends React.Component{ handelResponse(res,(response,msg)=>{ },err=>{ - Notify.clear(); - Notify.error(res.data.message); - return false; + + }); }).catch(err=>{