Skip to content

Commit

Permalink
Don't leave dataProvider console logs in production.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvarcas committed Nov 11, 2019
1 parent 96a8c76 commit ea24bdb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ra-core/src/dataProvider/useDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ const performUndoableQuery = ({
warnBeforeClosingWindow
);
}
console.error(error);
if (process.env.NODE_ENV !== 'production') {
console.error(error);
}
return logoutIfAccessDenied(error).then(loggedOut => {
if (loggedOut) return;
dispatch({
Expand Down Expand Up @@ -356,7 +358,9 @@ const performQuery = ({
return response;
})
.catch(error => {
console.error(error);
if (process.env.NODE_ENV !== 'production') {
console.error(error);
}
return logoutIfAccessDenied(error).then(loggedOut => {
if (loggedOut) return;
dispatch({
Expand Down

0 comments on commit ea24bdb

Please sign in to comment.