Core Data: Optimize getRawEntityRecord selector#76632
Conversation
|
Size Change: +23 B (0%) Total Size: 8.76 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in a3daea7. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23247283462
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
What?
A minor optimization for
getRawEntityRecordselector:getEntityConfigoutside the reducer loop to avoid lookups per key.rawAttributes.reducewithObject.fromEntriesfor readability. Seems to work better with types, too.P.S. I know
reducevsObject.fromEntriesreadability is debatable 😄Testing Instructions
Unit and e2e tests are passing.
Testing Instructions for Keyboard
Same.