Skip to content

Commit e333d97

Browse files
author
rodik
committed
filtering fix: invoke promise in all cases, but sometimes without blocking
1 parent ed35c37 commit e333d97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/ReduxAsyncConnect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ function loadAsyncConnect({components, filter = () => true, ...rest}) {
4141
const asyncItems = Component.reduxAsyncConnect;
4242

4343
return Promise.all(asyncItems.reduce((itemsResults, item) => {
44+
let promiseOrResult = item.promise(rest);
45+
4446
if (filter(item, Component)) {
45-
let promiseOrResult = item.promise(rest);
4647
if (promiseOrResult && promiseOrResult.then instanceof Function) {
4748
async = true;
4849
promiseOrResult = promiseOrResult.catch(error => ({error}));

0 commit comments

Comments
 (0)