From 18b5134f0ae02546d30ea3d072ffe70a1afd1f3b Mon Sep 17 00:00:00 2001 From: Derek Brans Date: Mon, 24 Aug 2015 15:18:54 -0700 Subject: [PATCH] Update api.js --- examples/real-world/middleware/api.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/real-world/middleware/api.js b/examples/real-world/middleware/api.js index 27e49f5a86..463d8ad006 100644 --- a/examples/real-world/middleware/api.js +++ b/examples/real-world/middleware/api.js @@ -94,7 +94,7 @@ export default store => next => action => { } let { endpoint } = callAPI; - const { schema, types, bailout } = callAPI; + const { schema, types } = callAPI; if (typeof endpoint === 'function') { endpoint = endpoint(store.getState()); @@ -112,13 +112,6 @@ export default store => next => action => { if (!types.every(type => typeof type === 'string')) { throw new Error('Expected action types to be strings.'); } - if (typeof bailout !== 'undefined' && typeof bailout !== 'function') { - throw new Error('Expected bailout to either be undefined or a function.'); - } - - if (bailout && bailout(store.getState())) { - return Promise.resolve(); - } function actionWith(data) { const finalAction = Object.assign({}, action, data);