Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

OPT: check element fisrt #2429

Merged
merged 2 commits into from
Sep 28, 2018
Merged

OPT: check element fisrt #2429

merged 2 commits into from
Sep 28, 2018

Conversation

HOUCe
Copy link
Contributor

@HOUCe HOUCe commented Sep 28, 2018

run if (!element) at first to avoid rest code running.

If if (!element) equals true, then stop executing the rest other wise we run element.forEach(item => walkTree(item, context, visitor, newContext)); all the time at first

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.

run ` if (!element)` at first to avoid rest code running.

If` if (!element)` equals true, then stop executing the rest other wise we run `element.forEach(item => walkTree(item, context, visitor, newContext));`  all the time at first
@apollo-cla
Copy link

@HOUCe: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

Great idea - thanks @HOUCe!

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

Successfully merging this pull request may close these issues.

3 participants