-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Core Data: Add checks to actions and selectors to avoid throwing errors when the relevant config is not loaded. #18559
Conversation
…relevant config is not loaded.
There was a problem hiding this 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can add some unit tests, to ensure these selectors/actions don't break when called early.
…rdNonTransientEdits` on entities without configs.
Updated and Tested! 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
…rs when the relevant config is not loaded. (#18559) * Core Data: Add checks to selectors to avoid throwing errors when the relevant config is not loaded. * Core Data: Throw when `editEntityRecord` targets an entity without a config. * Core Data: Fix default value typo in `getEntityRecordNonTransientEdits`. * Core Data: Test the behavior of `editEntityRecord` and `getEntityRecordNonTransientEdits` on entities without configs.
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. git-svn-id: https://develop.svn.wordpress.org/trunk@46860 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. git-svn-id: https://develop.svn.wordpress.org/trunk@46860 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. Built from https://develop.svn.wordpress.org/trunk@46860 git-svn-id: http://core.svn.wordpress.org/trunk@46660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. Built from https://develop.svn.wordpress.org/trunk@46860 git-svn-id: https://core.svn.wordpress.org/trunk@46660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Merges [46860] to the 5.3 branch. Fixes #48884. git-svn-id: https://develop.svn.wordpress.org/branches/5.3@46861 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Merges [46860] to the 5.3 branch. Fixes #48884. Built from https://develop.svn.wordpress.org/branches/5.3@46861 git-svn-id: http://core.svn.wordpress.org/branches/5.3@46661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Merges [46860] to the 5.3 branch. Fixes #48884. Built from https://develop.svn.wordpress.org/branches/5.3@46861 git-svn-id: https://core.svn.wordpress.org/branches/5.3@46661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. Built from https://develop.svn.wordpress.org/trunk@46860
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Merges [46860] to the 5.3 branch. Fixes #48884. Built from https://develop.svn.wordpress.org/branches/5.3@46861
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Fixes #48884. git-svn-id: http://develop.svn.wordpress.org/trunk@46860 602fd350-edb4-49c9-b593-d223f7449a82
The list of included fixes: - Edge scrolling issues WordPress/gutenberg#17707 - Intermittent JavaScript issues WordPress/gutenberg#18559 - Remove embed CollegeHumor WordPress/gutenberg#18591 Updated packages: - @wordpress/block-directory@1.0.6 - @wordpress/block-editor@3.2.5 - @wordpress/block-library@2.9.6 - @wordpress/core-data@2.7.5 - @wordpress/edit-post@3.8.6 - @wordpress/editor@9.7.6 - @wordpress/format-library@1.9.5 Props youknowriad, ellatrix, epiqueras, audrasjb, gziolo, mcsf, kyliesabra. Merges [46860] to the 5.3 branch. Fixes #48884. Built from https://develop.svn.wordpress.org/branches/5.3@46861 git-svn-id: http://core.svn.wordpress.org/branches/5.3@46661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Description
This PR adds some checks and guards to avoid throwing errors when
editEntityRecord
orisEditedPostDirty
are called without the relevant entity config being loaded.How has this been tested?
It was verified that running:
and
for inexistent entity configs is handled gracefully.
Types of Changes
Bug Fix:
editEntityRecord
andisEditedPostDirty
no longer throw an error when called beforecore-data
is initialized.Checklist: