From 41aa9864c90da1ed7abfdffe198a7bcce138ea7c Mon Sep 17 00:00:00 2001 From: Ville Saukkonen Date: Wed, 30 May 2018 11:26:15 +0300 Subject: [PATCH] unify handling with value & fetch request --- src/components/connect.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/connect.js b/src/components/connect.js index d000041..db6b4cb 100644 --- a/src/components/connect.js +++ b/src/components/connect.js @@ -274,12 +274,7 @@ function connect(mapPropsToRequestsToProps, defaults, options) { const onRejection = this.createPromiseStateOnRejection(prop, mapping, startedAt) if (mapping.hasOwnProperty('value')) { - if (hasIn(mapping.value, 'then')) { - this.setAtomicState(prop, startedAt, mapping, initPS(meta)) - return mapping.value.then(onFulfillment(meta), onRejection(meta)) - } else { - return onFulfillment(meta)(mapping.value) - } + return onFulfillment(meta)(mapping.value) } else { const request = mapping.buildRequest(mapping) meta.request = request