Skip to content

Conversation

@sheetalkamat
Copy link
Member

Fixes #37536

Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

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

Makes sense 👍

Comment on lines +7860 to +7865
if (!commentDirectives) {
commentDirectives = newDirectives;
}
else if (newDirectives) {
commentDirectives.push(...newDirectives);
}
Copy link
Member

Choose a reason for hiding this comment

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

I think concatenate in core can handle this in a single call, similarly to append

Copy link
Member Author

Choose a reason for hiding this comment

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

That one creates new array if both arrays are !undefined which is what this avoids since anyways we already have new array

@sheetalkamat sheetalkamat merged commit 7f59949 into master Mar 27, 2020
@sheetalkamat sheetalkamat deleted the commentDirective branch March 27, 2020 19:00
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@ts-ignore stops in editing (regression)

4 participants