-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
(fix) - invalidate null link #694
Conversation
🦋 Changeset is good to goLatest commit: c8b6a68 We got this. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -18,7 +18,7 @@ export const invalidateEntity = ( | |||
|
|||
for (let i = 0, l = fields.length; i < l; i++) { | |||
const { fieldKey } = fields[i]; | |||
if (InMemoryData.readLink(entityKey, fieldKey)) { | |||
if (InMemoryData.readLink(entityKey, fieldKey) !== undefined) { |
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.
Oops 😅
Thanks for the expedition here! Is there any chance of releasing a patch with this? |
@olistic I’ll get to releasing this tomorrow 👍 in the meantime you should be able to test this using CodeSandbox CI which publishes temporary packages per PR |
Thank you @kitten, this is a great tip! 🚀 |
@olistic this has now been released 🌟 |
Summary
There was an issue in invalidation when a link was null, this lead to the cache invalidating a record instead of the link since we were checking for a truthy value rather than just undefined.
Fixes: #693
Set of changes
!== undefined
so we account fornull