Skip to content

Commit 3f5c487

Browse files
committed
Update ReduxAsyncConnect.js
when response error is JSON object (coming from an API) we need to not cast it as a string.
1 parent 7bc1655 commit 3f5c487

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/ReduxAsyncConnect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function asyncConnectPromises(components, params, store, helpers) {
4242

4343
export function loadOnServer({ components, params }, store, helpers) {
4444
return Promise.all(asyncConnectPromises(filterAndFlattenComponents(components), params, store, helpers))
45-
.catch(error => console.error('reduxAsyncConnect server promise error: ' + error)).then(() => {
45+
.catch(error => console.error('reduxAsyncConnect server promise error: ', error)).then(() => {
4646
store.dispatch(endGlobalLoad());
4747
});
4848
}
@@ -107,7 +107,7 @@ class ReduxAsyncConnect extends React.Component {
107107
if (promises.length) {
108108
this.props.beginGlobalLoad();
109109
(loadDataCounterOriginal => {
110-
Promise.all(promises).catch(error => console.error('reduxAsyncConnect server promise error: ' + error))
110+
Promise.all(promises).catch(error => console.error('reduxAsyncConnect server promise error: ', error))
111111
.then(() => {
112112
// We need to change propsToShow only if loadAsyncData that called this promise
113113
// is the last invocation of loadAsyncData method. Otherwise we can face situation

0 commit comments

Comments
 (0)