Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow spread operator in race effect #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nantris
Copy link

@Nantris Nantris commented Apr 22, 2023

@pke this is a simple patch that fixes the rule crashing - but all it does is continues if there's a spread operator inside of race - it does not continue to try to detect the use of yield.

@pke
Copy link
Owner

pke commented May 4, 2023

Thanks for the PR. Can you please provide a code snippet and a test to verify your patch is working?

@Nantris
Copy link
Author

Nantris commented May 4, 2023

Thanks for the interest @pke. That's a completely reasonable request but unfortunately I doubt I will ever be able to find the time.

Here's the approximae code I had that caused me to run into the issue at least though:

const { foo, bar } = yield race({
  ...(bool
    ? {}
    : { foo: take(action => action.type === update.type) }),
  bar: take(action => action.type === setActive.type),
  timeout: delay(5000),
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants