`either` causes `RangeError: Maximum call stack size exceeded`
igorkamyshev opened this issue · 1 comments
igorkamyshev commented
test('do not make infinite loop with combination of delay', async () => {
const $isMobile = createStore(true);
const clickChooseDateButton = createEvent();
const forceDepartDateChoice = createEvent();
delay({
source: clickChooseDateButton,
timeout: either({ filter: $isMobile, then: 250, other: 0 }),
target: forceDepartDateChoice,
});
const scope = fork();
await allSettled(clickChooseDateButton, { scope });
});
igorkamyshev commented
I was wrong, without delay
it is same same 🤗
test('do not make infinite loop', async () => {
const $isMobile = createStore(true);
either({ filter: $isMobile, then: 250, other: 0 });
const scope = fork();
await allSettled($isMobile, { scope, params: false });
});