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

Hoist if block selectors #751

Merged
merged 3 commits into from
Aug 6, 2017
Merged

Hoist if block selectors #751

merged 3 commits into from
Aug 6, 2017

Conversation

Rich-Harris
Copy link
Member

It occurred to me that the get_block functions, which determine which block to render in a series of if...elseif...else blocks, can always be hoisted. Should save a microscopic amount of work when if blocks are inside each blocks, with no downside that I can think of.

I also renamed get_block to select_block_type (and current_block to current_block_type) since I think that's marginally more descriptive of what's happening.

@Rich-Harris Rich-Harris merged commit f3f8584 into master Aug 6, 2017
@Rich-Harris Rich-Harris deleted the hoist-if-block-selectors branch August 6, 2017 01:26
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.

1 participant