Skip to content

Commit f5bee87

Browse files
author
rodik
committed
this fixes issue: prevent to set promise to the ui #51
1 parent 37b87a1 commit f5bee87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/asyncConnect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,10 @@ function wrapWithDispatch(asyncItems) {
118118
dispatch(load(item.key));
119119
promiseOrResult.then(data => dispatch(loadSuccess(item.key, data)))
120120
.catch(err => dispatch(loadFail(item.key, err)));
121+
} else {
122+
dispatch(loadSuccess(item.key, promiseOrResult));
121123
}
122124

123-
dispatch(loadSuccess(item.key, promiseOrResult));
124125
}
125126
return promiseOrResult;
126127
}} : item

0 commit comments

Comments
 (0)