Closed arcanis closed 7 years ago
It seems I've successfully reproduced the bug described in #1. Testcase:
let { reduxBatch } = require('./'); let { put, takeEvery } = require('redux-saga/effects'); let createSagaMiddleware = require('redux-saga').default; let { applyMiddleware, compose, createStore } = require('redux'); let reducer = (state = {}) => state; let sagaMiddleware = createSagaMiddleware(); let store = createStore(reducer, compose(reduxBatch, applyMiddleware(sagaMiddleware), reduxBatch)); sagaMiddleware.run(function* () { yield takeEvery(`42`, function* (action) { yield put([ { type: `666` }, { type: `666` } ]); yield new Promise(resolve => setTimeout(resolve, 1000)); yield put([ { type: `666` }, { type: `666` } ]); console.log(`yada`); }); }); store.subscribe(() => { console.log(`subscriptors called!`); }); console.log(`start`); store.dispatch({ type: `42` }); console.log(`stop`);
It should print:
start subscriptors called! stop yada subscriptors called!
Unfortunately, it prints:
start subscriptors called! stop yada
Should be fixed with 274c2ca
It seems I've successfully reproduced the bug described in #1. Testcase:
It should print:
Unfortunately, it prints: