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

once immediate evaluation and changes to array item removal #3

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

avivshafir
Copy link

add immediate evaluation for WHEN and ONCE type actions.
changes to removal of array items, preventing future bugs when splicing array items while iterating over the array.

@jameslnewell jameslnewell merged commit 46f068e into jameslnewell:master Apr 11, 2017

//dispatch the delayed action
store.dispatch(when.payload.createAction(action));
const readyToBeDispatched = waiting
Copy link
Owner

@jameslnewell jameslnewell Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there any reason this section needed to change from a for loop?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi James! Thanks for merging my pull request!
This was changed because of possible future issues occuring when trying to mutate the array while iterating over it...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I changed it back because I thought the for loop was more readable and saved a few cpu cycles. If it is an issue with JS arrays please feel free to change it back!

@jameslnewell
Copy link
Owner

Thanks! I've released 2.0.0

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.

None yet

2 participants