Core Data: Fix the 'query._fields' property check inside 'getEntityRecord' resolver#65079
Core Data: Fix the 'query._fields' property check inside 'getEntityRecord' resolver#65079
Conversation
|
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. |
|
Size Change: +1 B (0%) Total Size: 1.78 MB
ℹ️ View Unchanged
|
jsnajdr
left a comment
There was a problem hiding this comment.
Yes, looks like a good hotfix 🙂
|
Thanks for testing and reviews. I'm looking into a proper fix. I'm going to start by adding "real" unit tests for the core data store, as discussed in #64996 (comment). |
…cord' resolver (#65079) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
* Core Data: Fix the 'query._fields' property check inside 'getEntityRecord' resolver (#65079) Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> * Site Title, Post Title: Fix typography for blocks with `a` children (#64911) * Apply styles for element + `a` child when present * Inherit styles from parent element when present * Add missing `-font-family` attribute selector * Interactivity API: Prevent calling `proxifyContext` over an already-proxified context inside the `wp-context` directive (#65090) * Do not store the proxified context inside `currentValue.current`. * Update changelog Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org> --------- Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: Rafael Gallani <galani.rafael@gmail.com> Co-authored-by: David Arenas <david.arenas@automattic.com> Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: gziolo <gziolo@git.wordpress.org>
What?
Part of #64996 (comment).
PR fixes the condition for early bailout inside the
getEntityRecordresolver. This matches check for a similar condition above:gutenberg/packages/core-data/src/resolvers.js
Line 126 in 29e344c
Why?
The special handling is only needed when the
_fieldsquery property is defined and not for every selector call that passes the query.Testing Instructions
CI checks are passing.