Skip to content

Hoist if block selectors#751

Merged
Rich-Harris merged 3 commits intomasterfrom
hoist-if-block-selectors
Aug 6, 2017
Merged

Hoist if block selectors#751
Rich-Harris merged 3 commits intomasterfrom
hoist-if-block-selectors

Conversation

@Rich-Harris
Copy link
Copy Markdown
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