Skip to content

navigation tree / bar: Set span of anonymous function to span of VariableDeclaration containing it #18575

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

Merged
2 commits merged into from
Sep 19, 2017

Conversation

ghost
Copy link

@ghost ghost commented Sep 19, 2017

Fixes #14251

@ghost ghost requested a review from armanio123 September 19, 2017 15:15
@ghost ghost force-pushed the navbar_span branch from 7b806b4 to d323073 Compare September 19, 2017 15:41
else if (decl.initializer && isFunctionOrClassExpression(decl.initializer)) {
// For `const x = function() {}`, just use the function node, not the const.
addChildrenRecursively(decl.initializer);
else if (initializer && (isArrowFunction(initializer) || isFunctionExpression(initializer) || isClassExpression(initializer))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest not removing the function because it makes easier to understand the code. But do use the helpers functions inside.

@ghost ghost merged commit 1264951 into master Sep 19, 2017
@ghost ghost deleted the navbar_span branch September 19, 2017 21:39
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This pull request was closed.
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.

2 participants