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

Do not walk unnecessary keys in truncate titles #2487

Merged
merged 5 commits into from
Sep 28, 2022
Merged

Conversation

mattseddon
Copy link
Member

@mattseddon mattseddon commented Sep 28, 2022

Small optimisation that I noticed whilst working on #2486.

@@ -255,6 +255,11 @@ export const truncateTitles = (
const specCopy: Record<string, unknown> = {}

for (const [key, value] of Object.entries(spec)) {
if (['data', 'color', 'strokeDash', 'shape', 'detail'].includes(key)) {
Copy link
Member Author

@mattseddon mattseddon Sep 28, 2022

Choose a reason for hiding this comment

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

[F] There should be no titles in any of these keys.

@mattseddon mattseddon marked this pull request as ready for review September 28, 2022 10:16
Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@mattseddon mattseddon enabled auto-merge (squash) September 28, 2022 20:32
@codeclimate
Copy link

codeclimate bot commented Sep 28, 2022

Code Climate has analyzed commit 110b176 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 96.9% (0.0% change).

View more on Code Climate.

@mattseddon mattseddon merged commit ea5621e into main Sep 28, 2022
@mattseddon mattseddon deleted the do-not-traverse-data branch September 28, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants